<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-comment">-- due to Debug.Trace</span><span>
</span><span id="line-2"></span><span class="hs-pragma">{-# LANGUAGE Trustworthy #-}</span><span>
</span><span id="line-3"></span><span>
</span><span id="line-4"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-5"></span><span class="hs-comment">-- |</span><span>
</span><span id="line-6"></span><span class="hs-comment">-- Module      :  Text.Parsec.Combinator</span><span>
</span><span id="line-7"></span><span class="hs-comment">-- Copyright   :  (c) Daan Leijen 1999-2001, (c) Paolo Martini 2007</span><span>
</span><span id="line-8"></span><span class="hs-comment">-- License     :  BSD-style (see the LICENSE file)</span><span>
</span><span id="line-9"></span><span class="hs-comment">--</span><span>
</span><span id="line-10"></span><span class="hs-comment">-- Maintainer  :  derek.a.elkins@gmail.com</span><span>
</span><span id="line-11"></span><span class="hs-comment">-- Stability   :  provisional</span><span>
</span><span id="line-12"></span><span class="hs-comment">-- Portability :  portable</span><span>
</span><span id="line-13"></span><span class="hs-comment">--</span><span>
</span><span id="line-14"></span><span class="hs-comment">-- Commonly used generic combinators.</span><span>
</span><span id="line-15"></span><span class="hs-comment">--</span><span>
</span><span id="line-16"></span><span class="hs-comment">-- See also the [parser-combinators](http://hackage.haskell.org/package/parser-combinators)</span><span>
</span><span id="line-17"></span><span class="hs-comment">-- package for additional (and generalised) combinators.</span><span>
</span><span id="line-18"></span><span class="hs-comment">--</span><span>
</span><span id="line-19"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-20"></span><span>
</span><span id="line-21"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">Text.Parsec.Combinator</span><span>
</span><span id="line-22"></span><span>    </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="Text.Parsec.Combinator.html#choice"><span class="hs-identifier">choice</span></a></span><span>
</span><span id="line-23"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Text.Parsec.Combinator.html#count"><span class="hs-identifier">count</span></a></span><span>
</span><span id="line-24"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Text.Parsec.Combinator.html#between"><span class="hs-identifier">between</span></a></span><span>
</span><span id="line-25"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Text.Parsec.Combinator.html#option"><span class="hs-identifier">option</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Text.Parsec.Combinator.html#optionMaybe"><span class="hs-identifier">optionMaybe</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Text.Parsec.Combinator.html#optional"><span class="hs-identifier">optional</span></a></span><span>
</span><span id="line-26"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Text.Parsec.Combinator.html#skipMany1"><span class="hs-identifier">skipMany1</span></a></span><span>
</span><span id="line-27"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Text.Parsec.Combinator.html#many1"><span class="hs-identifier">many1</span></a></span><span>
</span><span id="line-28"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Text.Parsec.Combinator.html#sepBy"><span class="hs-identifier">sepBy</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Text.Parsec.Combinator.html#sepBy1"><span class="hs-identifier">sepBy1</span></a></span><span>
</span><span id="line-29"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Text.Parsec.Combinator.html#endBy"><span class="hs-identifier">endBy</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Text.Parsec.Combinator.html#endBy1"><span class="hs-identifier">endBy1</span></a></span><span>
</span><span id="line-30"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Text.Parsec.Combinator.html#sepEndBy"><span class="hs-identifier">sepEndBy</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Text.Parsec.Combinator.html#sepEndBy1"><span class="hs-identifier">sepEndBy1</span></a></span><span>
</span><span id="line-31"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Text.Parsec.Combinator.html#chainl"><span class="hs-identifier">chainl</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Text.Parsec.Combinator.html#chainl1"><span class="hs-identifier">chainl1</span></a></span><span>
</span><span id="line-32"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Text.Parsec.Combinator.html#chainr"><span class="hs-identifier">chainr</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Text.Parsec.Combinator.html#chainr1"><span class="hs-identifier">chainr1</span></a></span><span>
</span><span id="line-33"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Text.Parsec.Combinator.html#eof"><span class="hs-identifier">eof</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Text.Parsec.Combinator.html#notFollowedBy"><span class="hs-identifier">notFollowedBy</span></a></span><span>
</span><span id="line-34"></span><span>    </span><span class="hs-comment">-- tricky combinators</span><span>
</span><span id="line-35"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Text.Parsec.Combinator.html#manyTill"><span class="hs-identifier">manyTill</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Text.Parsec.Prim.html#lookAhead"><span class="hs-identifier">lookAhead</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Text.Parsec.Combinator.html#anyToken"><span class="hs-identifier">anyToken</span></a></span><span>
</span><span id="line-36"></span><span>    </span><span class="annot"><span class="hs-comment">-- * Debugging</span></span><span>
</span><span id="line-37"></span><span>    </span><span class="hs-comment">--</span><span>
</span><span id="line-38"></span><span>    </span><span class="hs-comment">-- | As a more comprehensive alternative for debugging Parsec parsers,</span><span>
</span><span id="line-39"></span><span>    </span><span class="hs-comment">-- there's also the [parsec-free](http://hackage.haskell.org/package/parsec-free)</span><span>
</span><span id="line-40"></span><span>    </span><span class="hs-comment">-- package.</span><span>
</span><span id="line-41"></span><span>    </span><span class="hs-comment">--</span><span>
</span><span id="line-42"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Text.Parsec.Combinator.html#parserTrace"><span class="hs-identifier">parserTrace</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Text.Parsec.Combinator.html#parserTraced"><span class="hs-identifier">parserTraced</span></a></span><span>
</span><span id="line-43"></span><span>    </span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-44"></span><span>
</span><span id="line-45"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Control.Monad.html#"><span class="hs-identifier">Control.Monad</span></a></span><span>
</span><span id="line-46"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Text.Parsec.Prim.html"><span class="hs-identifier">Text.Parsec.Prim</span></a></span><span>
</span><span id="line-47"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Debug.Trace.html#"><span class="hs-identifier">Debug.Trace</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Debug.Trace.html#trace"><span class="hs-identifier">trace</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-48"></span><span>
</span><span id="line-49"></span><span class="hs-comment">-- | @choice ps@ tries to apply the parsers in the list @ps@ in order,</span><span>
</span><span id="line-50"></span><span class="hs-comment">-- until one of them succeeds. Returns the value of the succeeding</span><span>
</span><span id="line-51"></span><span class="hs-comment">-- parser.</span><span>
</span><span id="line-52"></span><span>
</span><span id="line-53"></span><span id="local-6989586621679060378"><span id="local-6989586621679060379"><span id="local-6989586621679060381"><span id="local-6989586621679060382"><span id="local-6989586621679060383"><span class="annot"><a href="Text.Parsec.Combinator.html#choice"><span class="hs-identifier hs-type">choice</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Text.Parsec.Prim.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060383"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060382"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060381"><span class="hs-identifier hs-type">t</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Text.Parsec.Prim.html#ParsecT"><span class="hs-identifier hs-type">ParsecT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060383"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060379"><span class="hs-identifier hs-type">u</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060382"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060378"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Text.Parsec.Prim.html#ParsecT"><span class="hs-identifier hs-type">ParsecT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060383"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060379"><span class="hs-identifier hs-type">u</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060382"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060378"><span class="hs-identifier hs-type">a</span></a></span></span></span></span></span></span><span>
</span><span id="line-54"></span><span class="hs-pragma">{-# INLINABLE</span><span> </span><span class="annot"><a href="Text.Parsec.Combinator.html#choice"><span class="hs-pragma hs-type">choice</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-55"></span><span id="choice"><span class="annot"><span class="annottext">choice :: forall s (m :: * -&gt; *) t u a.
Stream s m t =&gt;
[ParsecT s u m a] -&gt; ParsecT s u m a
</span><a href="Text.Parsec.Combinator.html#choice"><span class="hs-identifier hs-var hs-var">choice</span></a></span></span><span> </span><span id="local-6989586621679060080"><span class="annot"><span class="annottext">[ParsecT s u m a]
</span><a href="#local-6989586621679060080"><span class="hs-identifier hs-var">ps</span></a></span></span><span>           </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(ParsecT s u m a -&gt; ParsecT s u m a -&gt; ParsecT s u m a)
-&gt; ParsecT s u m a -&gt; [ParsecT s u m a] -&gt; ParsecT s u m a
forall (t :: * -&gt; *) a b.
Foldable t =&gt;
(a -&gt; b -&gt; b) -&gt; b -&gt; t a -&gt; b
</span><a href="../../base/src/Data.Foldable.html#foldr"><span class="hs-identifier hs-var">foldr</span></a></span><span> </span><span class="annot"><span class="annottext">ParsecT s u m a -&gt; ParsecT s u m a -&gt; ParsecT s u m a
forall s u (m :: * -&gt; *) a.
ParsecT s u m a -&gt; ParsecT s u m a -&gt; ParsecT s u m a
</span><a href="Text.Parsec.Prim.html#%3C%7C%3E"><span class="hs-operator hs-var">(&lt;|&gt;)</span></a></span><span> </span><span class="annot"><span class="annottext">ParsecT s u m a
forall (m :: * -&gt; *) a. MonadPlus m =&gt; m a
</span><a href="../../base/src/GHC.Base.html#mzero"><span class="hs-identifier hs-var">mzero</span></a></span><span> </span><span class="annot"><span class="annottext">[ParsecT s u m a]
</span><a href="#local-6989586621679060080"><span class="hs-identifier hs-var">ps</span></a></span><span>
</span><span id="line-56"></span><span>
</span><span id="line-57"></span><span class="hs-comment">-- | @option x p@ tries to apply parser @p@. If @p@ fails without</span><span>
</span><span id="line-58"></span><span class="hs-comment">-- consuming input, it returns the value @x@, otherwise the value</span><span>
</span><span id="line-59"></span><span class="hs-comment">-- returned by @p@.</span><span>
</span><span id="line-60"></span><span class="hs-comment">--</span><span>
</span><span id="line-61"></span><span class="hs-comment">-- &gt;  priority  = option 0 (do{ d &lt;- digit</span><span>
</span><span id="line-62"></span><span class="hs-comment">-- &gt;                          ; return (digitToInt d)</span><span>
</span><span id="line-63"></span><span class="hs-comment">-- &gt;                          })</span><span>
</span><span id="line-64"></span><span>
</span><span id="line-65"></span><span id="local-6989586621679060354"><span id="local-6989586621679060355"><span id="local-6989586621679060356"><span id="local-6989586621679060357"><span id="local-6989586621679060358"><span class="annot"><a href="Text.Parsec.Combinator.html#option"><span class="hs-identifier hs-type">option</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Text.Parsec.Prim.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060358"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060357"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060356"><span class="hs-identifier hs-type">t</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679060355"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Text.Parsec.Prim.html#ParsecT"><span class="hs-identifier hs-type">ParsecT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060358"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060354"><span class="hs-identifier hs-type">u</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060357"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060355"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Text.Parsec.Prim.html#ParsecT"><span class="hs-identifier hs-type">ParsecT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060358"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060354"><span class="hs-identifier hs-type">u</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060357"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060355"><span class="hs-identifier hs-type">a</span></a></span></span></span></span></span></span><span>
</span><span id="line-66"></span><span class="hs-pragma">{-# INLINABLE</span><span> </span><span class="annot"><a href="Text.Parsec.Combinator.html#option"><span class="hs-pragma hs-type">option</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-67"></span><span id="option"><span class="annot"><span class="annottext">option :: forall s (m :: * -&gt; *) t a u.
Stream s m t =&gt;
a -&gt; ParsecT s u m a -&gt; ParsecT s u m a
</span><a href="Text.Parsec.Combinator.html#option"><span class="hs-identifier hs-var hs-var">option</span></a></span></span><span> </span><span id="local-6989586621679060073"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679060073"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679060072"><span class="annot"><span class="annottext">ParsecT s u m a
</span><a href="#local-6989586621679060072"><span class="hs-identifier hs-var">p</span></a></span></span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ParsecT s u m a
</span><a href="#local-6989586621679060072"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">ParsecT s u m a -&gt; ParsecT s u m a -&gt; ParsecT s u m a
forall s u (m :: * -&gt; *) a.
ParsecT s u m a -&gt; ParsecT s u m a -&gt; ParsecT s u m a
</span><a href="Text.Parsec.Prim.html#%3C%7C%3E"><span class="hs-operator hs-var">&lt;|&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; ParsecT s u m a
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679060073"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-68"></span><span>
</span><span id="line-69"></span><span class="hs-comment">-- | @optionMaybe p@ tries to apply parser @p@.  If @p@ fails without</span><span>
</span><span id="line-70"></span><span class="hs-comment">-- consuming input, it return 'Nothing', otherwise it returns</span><span>
</span><span id="line-71"></span><span class="hs-comment">-- 'Just' the value returned by @p@.</span><span>
</span><span id="line-72"></span><span>
</span><span id="line-73"></span><span id="local-6989586621679060339"><span id="local-6989586621679060340"><span id="local-6989586621679060341"><span id="local-6989586621679060342"><span id="local-6989586621679060343"><span class="annot"><a href="Text.Parsec.Combinator.html#optionMaybe"><span class="hs-identifier hs-type">optionMaybe</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Text.Parsec.Prim.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060343"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060342"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060341"><span class="hs-identifier hs-type">t</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="Text.Parsec.Prim.html#ParsecT"><span class="hs-identifier hs-type">ParsecT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060343"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060340"><span class="hs-identifier hs-type">u</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060342"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060339"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Text.Parsec.Prim.html#ParsecT"><span class="hs-identifier hs-type">ParsecT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060343"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060340"><span class="hs-identifier hs-type">u</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060342"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060339"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span></span></span></span></span></span><span>
</span><span id="line-74"></span><span class="hs-pragma">{-# INLINABLE</span><span> </span><span class="annot"><a href="Text.Parsec.Combinator.html#optionMaybe"><span class="hs-pragma hs-type">optionMaybe</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-75"></span><span id="optionMaybe"><span class="annot"><span class="annottext">optionMaybe :: forall s (m :: * -&gt; *) t u a.
Stream s m t =&gt;
ParsecT s u m a -&gt; ParsecT s u m (Maybe a)
</span><a href="Text.Parsec.Combinator.html#optionMaybe"><span class="hs-identifier hs-var hs-var">optionMaybe</span></a></span></span><span> </span><span id="local-6989586621679060068"><span class="annot"><span class="annottext">ParsecT s u m a
</span><a href="#local-6989586621679060068"><span class="hs-identifier hs-var">p</span></a></span></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe a -&gt; ParsecT s u m (Maybe a) -&gt; ParsecT s u m (Maybe a)
forall s (m :: * -&gt; *) t a u.
Stream s m t =&gt;
a -&gt; ParsecT s u m a -&gt; ParsecT s u m a
</span><a href="Text.Parsec.Combinator.html#option"><span class="hs-identifier hs-var">option</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe a
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(a -&gt; Maybe a) -&gt; ParsecT s u m a -&gt; ParsecT s u m (Maybe a)
forall (m :: * -&gt; *) a1 r. Monad m =&gt; (a1 -&gt; r) -&gt; m a1 -&gt; m r
</span><a href="../../base/src/GHC.Base.html#liftM"><span class="hs-identifier hs-var">liftM</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; Maybe a
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">ParsecT s u m a
</span><a href="#local-6989586621679060068"><span class="hs-identifier hs-var">p</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-76"></span><span>
</span><span id="line-77"></span><span class="hs-comment">-- | @optional p@ tries to apply parser @p@.  It will parse @p@ or nothing.</span><span>
</span><span id="line-78"></span><span class="hs-comment">-- It only fails if @p@ fails after consuming input. It discards the result</span><span>
</span><span id="line-79"></span><span class="hs-comment">-- of @p@.</span><span>
</span><span id="line-80"></span><span>
</span><span id="line-81"></span><span id="local-6989586621679060325"><span id="local-6989586621679060326"><span id="local-6989586621679060327"><span id="local-6989586621679060328"><span id="local-6989586621679060329"><span class="annot"><a href="Text.Parsec.Combinator.html#optional"><span class="hs-identifier hs-type">optional</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Text.Parsec.Prim.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060329"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060328"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060327"><span class="hs-identifier hs-type">t</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="Text.Parsec.Prim.html#ParsecT"><span class="hs-identifier hs-type">ParsecT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060329"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060326"><span class="hs-identifier hs-type">u</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060328"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060325"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Text.Parsec.Prim.html#ParsecT"><span class="hs-identifier hs-type">ParsecT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060329"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060326"><span class="hs-identifier hs-type">u</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060328"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span></span></span></span></span></span><span>
</span><span id="line-82"></span><span class="hs-pragma">{-# INLINABLE</span><span> </span><span class="annot"><a href="Text.Parsec.Combinator.html#optional"><span class="hs-pragma hs-type">optional</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-83"></span><span id="optional"><span class="annot"><span class="annottext">optional :: forall s (m :: * -&gt; *) t u a.
Stream s m t =&gt;
ParsecT s u m a -&gt; ParsecT s u m ()
</span><a href="Text.Parsec.Combinator.html#optional"><span class="hs-identifier hs-var hs-var">optional</span></a></span></span><span> </span><span id="local-6989586621679060062"><span class="annot"><span class="annottext">ParsecT s u m a
</span><a href="#local-6989586621679060062"><span class="hs-identifier hs-var">p</span></a></span></span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">ParsecT s u m a
</span><a href="#local-6989586621679060062"><span class="hs-identifier hs-var">p</span></a></span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">() -&gt; ParsecT s u m ()
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span class="hs-special">}</span><span> </span><span class="annot"><span class="annottext">ParsecT s u m () -&gt; ParsecT s u m () -&gt; ParsecT s u m ()
forall s u (m :: * -&gt; *) a.
ParsecT s u m a -&gt; ParsecT s u m a -&gt; ParsecT s u m a
</span><a href="Text.Parsec.Prim.html#%3C%7C%3E"><span class="hs-operator hs-var">&lt;|&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">() -&gt; ParsecT s u m ()
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-84"></span><span>
</span><span id="line-85"></span><span class="hs-comment">-- | @between open close p@ parses @open@, followed by @p@ and @close@.</span><span>
</span><span id="line-86"></span><span class="hs-comment">-- Returns the value returned by @p@.</span><span>
</span><span id="line-87"></span><span class="hs-comment">--</span><span>
</span><span id="line-88"></span><span class="hs-comment">-- &gt;  braces  = between (symbol &quot;{&quot;) (symbol &quot;}&quot;)</span><span>
</span><span id="line-89"></span><span>
</span><span id="line-90"></span><span id="local-6989586621679060313"><span id="local-6989586621679060314"><span id="local-6989586621679060315"><span id="local-6989586621679060316"><span id="local-6989586621679060317"><span id="local-6989586621679060318"><span id="local-6989586621679060319"><span class="annot"><a href="Text.Parsec.Combinator.html#between"><span class="hs-identifier hs-type">between</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Text.Parsec.Prim.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060319"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060318"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060317"><span class="hs-identifier hs-type">t</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="Text.Parsec.Prim.html#ParsecT"><span class="hs-identifier hs-type">ParsecT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060319"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060316"><span class="hs-identifier hs-type">u</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060318"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060315"><span class="hs-identifier hs-type">open</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Text.Parsec.Prim.html#ParsecT"><span class="hs-identifier hs-type">ParsecT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060319"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060316"><span class="hs-identifier hs-type">u</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060318"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060314"><span class="hs-identifier hs-type">close</span></a></span><span>
</span><span id="line-91"></span><span>            </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Text.Parsec.Prim.html#ParsecT"><span class="hs-identifier hs-type">ParsecT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060319"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060316"><span class="hs-identifier hs-type">u</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060318"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060313"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Text.Parsec.Prim.html#ParsecT"><span class="hs-identifier hs-type">ParsecT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060319"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060316"><span class="hs-identifier hs-type">u</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060318"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060313"><span class="hs-identifier hs-type">a</span></a></span></span></span></span></span></span></span></span><span>
</span><span id="line-92"></span><span class="hs-pragma">{-# INLINABLE</span><span> </span><span class="annot"><a href="Text.Parsec.Combinator.html#between"><span class="hs-pragma hs-type">between</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-93"></span><span id="between"><span class="annot"><span class="annottext">between :: forall s (m :: * -&gt; *) t u open close a.
Stream s m t =&gt;
ParsecT s u m open
-&gt; ParsecT s u m close -&gt; ParsecT s u m a -&gt; ParsecT s u m a
</span><a href="Text.Parsec.Combinator.html#between"><span class="hs-identifier hs-var hs-var">between</span></a></span></span><span> </span><span id="local-6989586621679060056"><span class="annot"><span class="annottext">ParsecT s u m open
</span><a href="#local-6989586621679060056"><span class="hs-identifier hs-var">open</span></a></span></span><span> </span><span id="local-6989586621679060055"><span class="annot"><span class="annottext">ParsecT s u m close
</span><a href="#local-6989586621679060055"><span class="hs-identifier hs-var">close</span></a></span></span><span> </span><span id="local-6989586621679060054"><span class="annot"><span class="annottext">ParsecT s u m a
</span><a href="#local-6989586621679060054"><span class="hs-identifier hs-var">p</span></a></span></span><span>
</span><span id="line-94"></span><span>                    </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">open
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">ParsecT s u m open
</span><a href="#local-6989586621679060056"><span class="hs-identifier hs-var">open</span></a></span><span class="hs-special">;</span><span> </span><span id="local-6989586621679060053"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679060053"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">ParsecT s u m a
</span><a href="#local-6989586621679060054"><span class="hs-identifier hs-var">p</span></a></span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">close
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">ParsecT s u m close
</span><a href="#local-6989586621679060055"><span class="hs-identifier hs-var">close</span></a></span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">a -&gt; ParsecT s u m a
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679060053"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-95"></span><span>
</span><span id="line-96"></span><span class="hs-comment">-- | @skipMany1 p@ applies the parser @p@ /one/ or more times, skipping</span><span>
</span><span id="line-97"></span><span class="hs-comment">-- its result.</span><span>
</span><span id="line-98"></span><span>
</span><span id="line-99"></span><span id="local-6989586621679060048"><span id="local-6989586621679060049"><span id="local-6989586621679060050"><span id="local-6989586621679060051"><span id="local-6989586621679060052"><span class="annot"><a href="Text.Parsec.Combinator.html#skipMany1"><span class="hs-identifier hs-type">skipMany1</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Text.Parsec.Prim.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060052"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060051"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060050"><span class="hs-identifier hs-type">t</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="Text.Parsec.Prim.html#ParsecT"><span class="hs-identifier hs-type">ParsecT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060052"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060049"><span class="hs-identifier hs-type">u</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060051"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060048"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Text.Parsec.Prim.html#ParsecT"><span class="hs-identifier hs-type">ParsecT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060052"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060049"><span class="hs-identifier hs-type">u</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060051"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span></span></span></span></span></span><span>
</span><span id="line-100"></span><span class="hs-pragma">{-# INLINABLE</span><span> </span><span class="annot"><a href="Text.Parsec.Combinator.html#skipMany1"><span class="hs-pragma hs-type">skipMany1</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-101"></span><span id="skipMany1"><span class="annot"><span class="annottext">skipMany1 :: forall s (m :: * -&gt; *) t u a.
Stream s m t =&gt;
ParsecT s u m a -&gt; ParsecT s u m ()
</span><a href="Text.Parsec.Combinator.html#skipMany1"><span class="hs-identifier hs-var hs-var">skipMany1</span></a></span></span><span> </span><span id="local-6989586621679060045"><span class="annot"><span class="annottext">ParsecT s u m a
</span><a href="#local-6989586621679060045"><span class="hs-identifier hs-var">p</span></a></span></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">ParsecT s u m a
</span><a href="#local-6989586621679060045"><span class="hs-identifier hs-var">p</span></a></span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">ParsecT s u m a -&gt; ParsecT s u m ()
forall s u (m :: * -&gt; *) a. ParsecT s u m a -&gt; ParsecT s u m ()
</span><a href="Text.Parsec.Prim.html#skipMany"><span class="hs-identifier hs-var">skipMany</span></a></span><span> </span><span class="annot"><span class="annottext">ParsecT s u m a
</span><a href="#local-6989586621679060045"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-102"></span><span class="hs-comment">{-
skipMany p          = scan
                    where
                      scan  = do{ p; scan } &lt;|&gt; return ()
-}</span><span>
</span><span id="line-107"></span><span>
</span><span id="line-108"></span><span class="hs-comment">-- | @many1 p@ applies the parser @p@ /one/ or more times. Returns a</span><span>
</span><span id="line-109"></span><span class="hs-comment">-- list of the returned values of @p@.</span><span>
</span><span id="line-110"></span><span class="hs-comment">--</span><span>
</span><span id="line-111"></span><span class="hs-comment">-- &gt;  word  = many1 letter</span><span>
</span><span id="line-112"></span><span>
</span><span id="line-113"></span><span id="local-6989586621679060292"><span id="local-6989586621679060293"><span id="local-6989586621679060294"><span id="local-6989586621679060295"><span id="local-6989586621679060296"><span class="annot"><a href="Text.Parsec.Combinator.html#many1"><span class="hs-identifier hs-type">many1</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Text.Parsec.Prim.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060296"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060295"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060294"><span class="hs-identifier hs-type">t</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="Text.Parsec.Prim.html#ParsecT"><span class="hs-identifier hs-type">ParsecT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060296"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060293"><span class="hs-identifier hs-type">u</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060295"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060292"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Text.Parsec.Prim.html#ParsecT"><span class="hs-identifier hs-type">ParsecT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060296"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060293"><span class="hs-identifier hs-type">u</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060295"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679060292"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span></span></span></span></span></span><span>
</span><span id="line-114"></span><span class="hs-pragma">{-# INLINABLE</span><span> </span><span class="annot"><a href="Text.Parsec.Combinator.html#many1"><span class="hs-pragma hs-type">many1</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-115"></span><span id="many1"><span class="annot"><span class="annottext">many1 :: forall s (m :: * -&gt; *) t u a.
Stream s m t =&gt;
ParsecT s u m a -&gt; ParsecT s u m [a]
</span><a href="Text.Parsec.Combinator.html#many1"><span class="hs-identifier hs-var hs-var">many1</span></a></span></span><span> </span><span id="local-6989586621679060039"><span class="annot"><span class="annottext">ParsecT s u m a
</span><a href="#local-6989586621679060039"><span class="hs-identifier hs-var">p</span></a></span></span><span>             </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span class="hs-special">{</span><span> </span><span id="local-6989586621679060038"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679060038"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">ParsecT s u m a
</span><a href="#local-6989586621679060039"><span class="hs-identifier hs-var">p</span></a></span><span class="hs-special">;</span><span> </span><span id="local-6989586621679060037"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679060037"><span class="hs-identifier hs-var">xs</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">ParsecT s u m a -&gt; ParsecT s u m [a]
forall s u (m :: * -&gt; *) a. ParsecT s u m a -&gt; ParsecT s u m [a]
</span><a href="Text.Parsec.Prim.html#many"><span class="hs-identifier hs-var">many</span></a></span><span> </span><span class="annot"><span class="annottext">ParsecT s u m a
</span><a href="#local-6989586621679060039"><span class="hs-identifier hs-var">p</span></a></span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">[a] -&gt; ParsecT s u m [a]
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679060038"><span class="hs-identifier hs-var">x</span></a></span><span class="annot"><span class="annottext">a -&gt; [a] -&gt; [a]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679060037"><span class="hs-identifier hs-var">xs</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-116"></span><span class="hs-comment">{-
many p              = scan id
                    where
                      scan f    = do{ x &lt;- p
                                    ; scan (\tail -&gt; f (x:tail))
                                    }
                                &lt;|&gt; return (f [])
-}</span><span>
</span><span id="line-124"></span><span>
</span><span id="line-125"></span><span>
</span><span id="line-126"></span><span class="hs-comment">-- | @sepBy p sep@ parses /zero/ or more occurrences of @p@, separated</span><span>
</span><span id="line-127"></span><span class="hs-comment">-- by @sep@. Returns a list of values returned by @p@.</span><span>
</span><span id="line-128"></span><span class="hs-comment">--</span><span>
</span><span id="line-129"></span><span class="hs-comment">-- &gt;  commaSep p  = p `sepBy` (symbol &quot;,&quot;)</span><span>
</span><span id="line-130"></span><span>
</span><span id="line-131"></span><span id="local-6989586621679060277"><span id="local-6989586621679060278"><span id="local-6989586621679060279"><span id="local-6989586621679060280"><span id="local-6989586621679060281"><span id="local-6989586621679060282"><span class="annot"><a href="Text.Parsec.Combinator.html#sepBy"><span class="hs-identifier hs-type">sepBy</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Text.Parsec.Prim.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060282"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060281"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060280"><span class="hs-identifier hs-type">t</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="Text.Parsec.Prim.html#ParsecT"><span class="hs-identifier hs-type">ParsecT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060282"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060279"><span class="hs-identifier hs-type">u</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060281"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060278"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Text.Parsec.Prim.html#ParsecT"><span class="hs-identifier hs-type">ParsecT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060282"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060279"><span class="hs-identifier hs-type">u</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060281"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060277"><span class="hs-identifier hs-type">sep</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Text.Parsec.Prim.html#ParsecT"><span class="hs-identifier hs-type">ParsecT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060282"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060279"><span class="hs-identifier hs-type">u</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060281"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679060278"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span></span></span></span></span></span></span><span>
</span><span id="line-132"></span><span class="hs-pragma">{-# INLINABLE</span><span> </span><span class="annot"><a href="Text.Parsec.Combinator.html#sepBy"><span class="hs-pragma hs-type">sepBy</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-133"></span><span id="sepBy"><span class="annot"><span class="annottext">sepBy :: forall s (m :: * -&gt; *) t u a sep.
Stream s m t =&gt;
ParsecT s u m a -&gt; ParsecT s u m sep -&gt; ParsecT s u m [a]
</span><a href="Text.Parsec.Combinator.html#sepBy"><span class="hs-identifier hs-var hs-var">sepBy</span></a></span></span><span> </span><span id="local-6989586621679060032"><span class="annot"><span class="annottext">ParsecT s u m a
</span><a href="#local-6989586621679060032"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span id="local-6989586621679060031"><span class="annot"><span class="annottext">ParsecT s u m sep
</span><a href="#local-6989586621679060031"><span class="hs-identifier hs-var">sep</span></a></span></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ParsecT s u m a -&gt; ParsecT s u m sep -&gt; ParsecT s u m [a]
forall s (m :: * -&gt; *) t u a sep.
Stream s m t =&gt;
ParsecT s u m a -&gt; ParsecT s u m sep -&gt; ParsecT s u m [a]
</span><a href="Text.Parsec.Combinator.html#sepBy1"><span class="hs-identifier hs-var">sepBy1</span></a></span><span> </span><span class="annot"><span class="annottext">ParsecT s u m a
</span><a href="#local-6989586621679060032"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">ParsecT s u m sep
</span><a href="#local-6989586621679060031"><span class="hs-identifier hs-var">sep</span></a></span><span> </span><span class="annot"><span class="annottext">ParsecT s u m [a] -&gt; ParsecT s u m [a] -&gt; ParsecT s u m [a]
forall s u (m :: * -&gt; *) a.
ParsecT s u m a -&gt; ParsecT s u m a -&gt; ParsecT s u m a
</span><a href="Text.Parsec.Prim.html#%3C%7C%3E"><span class="hs-operator hs-var">&lt;|&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">[a] -&gt; ParsecT s u m [a]
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-134"></span><span>
</span><span id="line-135"></span><span class="hs-comment">-- | @sepBy1 p sep@ parses /one/ or more occurrences of @p@, separated</span><span>
</span><span id="line-136"></span><span class="hs-comment">-- by @sep@. Returns a list of values returned by @p@.</span><span>
</span><span id="line-137"></span><span>
</span><span id="line-138"></span><span id="local-6989586621679060025"><span id="local-6989586621679060026"><span id="local-6989586621679060027"><span id="local-6989586621679060028"><span id="local-6989586621679060029"><span id="local-6989586621679060030"><span class="annot"><a href="Text.Parsec.Combinator.html#sepBy1"><span class="hs-identifier hs-type">sepBy1</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Text.Parsec.Prim.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060030"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060029"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060028"><span class="hs-identifier hs-type">t</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="Text.Parsec.Prim.html#ParsecT"><span class="hs-identifier hs-type">ParsecT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060030"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060027"><span class="hs-identifier hs-type">u</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060029"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060026"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Text.Parsec.Prim.html#ParsecT"><span class="hs-identifier hs-type">ParsecT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060030"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060027"><span class="hs-identifier hs-type">u</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060029"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060025"><span class="hs-identifier hs-type">sep</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Text.Parsec.Prim.html#ParsecT"><span class="hs-identifier hs-type">ParsecT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060030"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060027"><span class="hs-identifier hs-type">u</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060029"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679060026"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span></span></span></span></span></span></span><span>
</span><span id="line-139"></span><span class="hs-pragma">{-# INLINABLE</span><span> </span><span class="annot"><a href="Text.Parsec.Combinator.html#sepBy1"><span class="hs-pragma hs-type">sepBy1</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-140"></span><span id="sepBy1"><span class="annot"><span class="annottext">sepBy1 :: forall s (m :: * -&gt; *) t u a sep.
Stream s m t =&gt;
ParsecT s u m a -&gt; ParsecT s u m sep -&gt; ParsecT s u m [a]
</span><a href="Text.Parsec.Combinator.html#sepBy1"><span class="hs-identifier hs-var hs-var">sepBy1</span></a></span></span><span> </span><span id="local-6989586621679060019"><span class="annot"><span class="annottext">ParsecT s u m a
</span><a href="#local-6989586621679060019"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span id="local-6989586621679060018"><span class="annot"><span class="annottext">ParsecT s u m sep
</span><a href="#local-6989586621679060018"><span class="hs-identifier hs-var">sep</span></a></span></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span class="hs-special">{</span><span> </span><span id="local-6989586621679060017"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679060017"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">ParsecT s u m a
</span><a href="#local-6989586621679060019"><span class="hs-identifier hs-var">p</span></a></span><span>
</span><span id="line-141"></span><span>                        </span><span class="hs-special">;</span><span> </span><span id="local-6989586621679060016"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679060016"><span class="hs-identifier hs-var">xs</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">ParsecT s u m a -&gt; ParsecT s u m [a]
forall s u (m :: * -&gt; *) a. ParsecT s u m a -&gt; ParsecT s u m [a]
</span><a href="Text.Parsec.Prim.html#many"><span class="hs-identifier hs-var">many</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ParsecT s u m sep
</span><a href="#local-6989586621679060018"><span class="hs-identifier hs-var">sep</span></a></span><span> </span><span class="annot"><span class="annottext">ParsecT s u m sep -&gt; ParsecT s u m a -&gt; ParsecT s u m a
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; m b -&gt; m b
</span><a href="../../base/src/GHC.Base.html#%3E%3E"><span class="hs-operator hs-var">&gt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">ParsecT s u m a
</span><a href="#local-6989586621679060019"><span class="hs-identifier hs-var">p</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-142"></span><span>                        </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">[a] -&gt; ParsecT s u m [a]
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679060017"><span class="hs-identifier hs-var">x</span></a></span><span class="annot"><span class="annottext">a -&gt; [a] -&gt; [a]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679060016"><span class="hs-identifier hs-var">xs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-143"></span><span>                        </span><span class="hs-special">}</span><span>
</span><span id="line-144"></span><span>
</span><span id="line-145"></span><span>
</span><span id="line-146"></span><span class="hs-comment">-- | @sepEndBy1 p sep@ parses /one/ or more occurrences of @p@,</span><span>
</span><span id="line-147"></span><span class="hs-comment">-- separated and optionally ended by @sep@. Returns a list of values</span><span>
</span><span id="line-148"></span><span class="hs-comment">-- returned by @p@.</span><span>
</span><span id="line-149"></span><span>
</span><span id="line-150"></span><span id="local-6989586621679060010"><span id="local-6989586621679060011"><span id="local-6989586621679060012"><span id="local-6989586621679060013"><span id="local-6989586621679060014"><span id="local-6989586621679060015"><span class="annot"><a href="Text.Parsec.Combinator.html#sepEndBy1"><span class="hs-identifier hs-type">sepEndBy1</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Text.Parsec.Prim.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060015"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060014"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060013"><span class="hs-identifier hs-type">t</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="Text.Parsec.Prim.html#ParsecT"><span class="hs-identifier hs-type">ParsecT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060015"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060012"><span class="hs-identifier hs-type">u</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060014"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060011"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Text.Parsec.Prim.html#ParsecT"><span class="hs-identifier hs-type">ParsecT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060015"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060012"><span class="hs-identifier hs-type">u</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060014"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060010"><span class="hs-identifier hs-type">sep</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Text.Parsec.Prim.html#ParsecT"><span class="hs-identifier hs-type">ParsecT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060015"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060012"><span class="hs-identifier hs-type">u</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060014"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679060011"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span></span></span></span></span></span></span><span>
</span><span id="line-151"></span><span class="hs-pragma">{-# INLINABLE</span><span> </span><span class="annot"><a href="Text.Parsec.Combinator.html#sepEndBy1"><span class="hs-pragma hs-type">sepEndBy1</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-152"></span><span id="sepEndBy1"><span class="annot"><span class="annottext">sepEndBy1 :: forall s (m :: * -&gt; *) t u a sep.
Stream s m t =&gt;
ParsecT s u m a -&gt; ParsecT s u m sep -&gt; ParsecT s u m [a]
</span><a href="Text.Parsec.Combinator.html#sepEndBy1"><span class="hs-identifier hs-var hs-var">sepEndBy1</span></a></span></span><span> </span><span id="local-6989586621679060002"><span class="annot"><span class="annottext">ParsecT s u m a
</span><a href="#local-6989586621679060002"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span id="local-6989586621679060001"><span class="annot"><span class="annottext">ParsecT s u m sep
</span><a href="#local-6989586621679060001"><span class="hs-identifier hs-var">sep</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span class="hs-special">{</span><span> </span><span id="local-6989586621679060000"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679060000"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">ParsecT s u m a
</span><a href="#local-6989586621679060002"><span class="hs-identifier hs-var">p</span></a></span><span>
</span><span id="line-153"></span><span>                        </span><span class="hs-special">;</span><span> </span><span class="hs-keyword">do</span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">sep
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">ParsecT s u m sep
</span><a href="#local-6989586621679060001"><span class="hs-identifier hs-var">sep</span></a></span><span>
</span><span id="line-154"></span><span>                            </span><span class="hs-special">;</span><span> </span><span id="local-6989586621679059999"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679059999"><span class="hs-identifier hs-var">xs</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">ParsecT s u m a -&gt; ParsecT s u m sep -&gt; ParsecT s u m [a]
forall s (m :: * -&gt; *) t u a sep.
Stream s m t =&gt;
ParsecT s u m a -&gt; ParsecT s u m sep -&gt; ParsecT s u m [a]
</span><a href="Text.Parsec.Combinator.html#sepEndBy"><span class="hs-identifier hs-var">sepEndBy</span></a></span><span> </span><span class="annot"><span class="annottext">ParsecT s u m a
</span><a href="#local-6989586621679060002"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">ParsecT s u m sep
</span><a href="#local-6989586621679060001"><span class="hs-identifier hs-var">sep</span></a></span><span>
</span><span id="line-155"></span><span>                            </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">[a] -&gt; ParsecT s u m [a]
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679060000"><span class="hs-identifier hs-var">x</span></a></span><span class="annot"><span class="annottext">a -&gt; [a] -&gt; [a]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679059999"><span class="hs-identifier hs-var">xs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-156"></span><span>                            </span><span class="hs-special">}</span><span>
</span><span id="line-157"></span><span>                          </span><span class="annot"><span class="annottext">ParsecT s u m [a] -&gt; ParsecT s u m [a] -&gt; ParsecT s u m [a]
forall s u (m :: * -&gt; *) a.
ParsecT s u m a -&gt; ParsecT s u m a -&gt; ParsecT s u m a
</span><a href="Text.Parsec.Prim.html#%3C%7C%3E"><span class="hs-operator hs-var">&lt;|&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">[a] -&gt; ParsecT s u m [a]
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679060000"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-158"></span><span>                        </span><span class="hs-special">}</span><span>
</span><span id="line-159"></span><span>
</span><span id="line-160"></span><span class="hs-comment">-- | @sepEndBy p sep@ parses /zero/ or more occurrences of @p@,</span><span>
</span><span id="line-161"></span><span class="hs-comment">-- separated and optionally ended by @sep@, ie. haskell style</span><span>
</span><span id="line-162"></span><span class="hs-comment">-- statements. Returns a list of values returned by @p@.</span><span>
</span><span id="line-163"></span><span class="hs-comment">--</span><span>
</span><span id="line-164"></span><span class="hs-comment">-- &gt;  haskellStatements  = haskellStatement `sepEndBy` semi</span><span>
</span><span id="line-165"></span><span>
</span><span id="line-166"></span><span id="local-6989586621679059993"><span id="local-6989586621679059994"><span id="local-6989586621679059995"><span id="local-6989586621679059996"><span id="local-6989586621679059997"><span id="local-6989586621679059998"><span class="annot"><a href="Text.Parsec.Combinator.html#sepEndBy"><span class="hs-identifier hs-type">sepEndBy</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Text.Parsec.Prim.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679059998"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679059997"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679059996"><span class="hs-identifier hs-type">t</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="Text.Parsec.Prim.html#ParsecT"><span class="hs-identifier hs-type">ParsecT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679059998"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679059995"><span class="hs-identifier hs-type">u</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679059997"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679059994"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Text.Parsec.Prim.html#ParsecT"><span class="hs-identifier hs-type">ParsecT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679059998"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679059995"><span class="hs-identifier hs-type">u</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679059997"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679059993"><span class="hs-identifier hs-type">sep</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Text.Parsec.Prim.html#ParsecT"><span class="hs-identifier hs-type">ParsecT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679059998"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679059995"><span class="hs-identifier hs-type">u</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679059997"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679059994"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span></span></span></span></span></span></span><span>
</span><span id="line-167"></span><span class="hs-pragma">{-# INLINABLE</span><span> </span><span class="annot"><a href="Text.Parsec.Combinator.html#sepEndBy"><span class="hs-pragma hs-type">sepEndBy</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-168"></span><span id="sepEndBy"><span class="annot"><span class="annottext">sepEndBy :: forall s (m :: * -&gt; *) t u a sep.
Stream s m t =&gt;
ParsecT s u m a -&gt; ParsecT s u m sep -&gt; ParsecT s u m [a]
</span><a href="Text.Parsec.Combinator.html#sepEndBy"><span class="hs-identifier hs-var hs-var">sepEndBy</span></a></span></span><span> </span><span id="local-6989586621679059989"><span class="annot"><span class="annottext">ParsecT s u m a
</span><a href="#local-6989586621679059989"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span id="local-6989586621679059988"><span class="annot"><span class="annottext">ParsecT s u m sep
</span><a href="#local-6989586621679059988"><span class="hs-identifier hs-var">sep</span></a></span></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ParsecT s u m a -&gt; ParsecT s u m sep -&gt; ParsecT s u m [a]
forall s (m :: * -&gt; *) t u a sep.
Stream s m t =&gt;
ParsecT s u m a -&gt; ParsecT s u m sep -&gt; ParsecT s u m [a]
</span><a href="Text.Parsec.Combinator.html#sepEndBy1"><span class="hs-identifier hs-var">sepEndBy1</span></a></span><span> </span><span class="annot"><span class="annottext">ParsecT s u m a
</span><a href="#local-6989586621679059989"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">ParsecT s u m sep
</span><a href="#local-6989586621679059988"><span class="hs-identifier hs-var">sep</span></a></span><span> </span><span class="annot"><span class="annottext">ParsecT s u m [a] -&gt; ParsecT s u m [a] -&gt; ParsecT s u m [a]
forall s u (m :: * -&gt; *) a.
ParsecT s u m a -&gt; ParsecT s u m a -&gt; ParsecT s u m a
</span><a href="Text.Parsec.Prim.html#%3C%7C%3E"><span class="hs-operator hs-var">&lt;|&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">[a] -&gt; ParsecT s u m [a]
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-169"></span><span>
</span><span id="line-170"></span><span>
</span><span id="line-171"></span><span class="hs-comment">-- | @endBy1 p sep@ parses /one/ or more occurrences of @p@, separated</span><span>
</span><span id="line-172"></span><span class="hs-comment">-- and ended by @sep@. Returns a list of values returned by @p@.</span><span>
</span><span id="line-173"></span><span>
</span><span id="line-174"></span><span id="local-6989586621679059982"><span id="local-6989586621679059983"><span id="local-6989586621679059984"><span id="local-6989586621679059985"><span id="local-6989586621679059986"><span id="local-6989586621679059987"><span class="annot"><a href="Text.Parsec.Combinator.html#endBy1"><span class="hs-identifier hs-type">endBy1</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Text.Parsec.Prim.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679059987"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679059986"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679059985"><span class="hs-identifier hs-type">t</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="Text.Parsec.Prim.html#ParsecT"><span class="hs-identifier hs-type">ParsecT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679059987"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679059984"><span class="hs-identifier hs-type">u</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679059986"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679059983"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Text.Parsec.Prim.html#ParsecT"><span class="hs-identifier hs-type">ParsecT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679059987"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679059984"><span class="hs-identifier hs-type">u</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679059986"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679059982"><span class="hs-identifier hs-type">sep</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Text.Parsec.Prim.html#ParsecT"><span class="hs-identifier hs-type">ParsecT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679059987"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679059984"><span class="hs-identifier hs-type">u</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679059986"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679059983"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span></span></span></span></span></span></span><span>
</span><span id="line-175"></span><span class="hs-pragma">{-# INLINABLE</span><span> </span><span class="annot"><a href="Text.Parsec.Combinator.html#endBy1"><span class="hs-pragma hs-type">endBy1</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-176"></span><span id="endBy1"><span class="annot"><span class="annottext">endBy1 :: forall s (m :: * -&gt; *) t u a sep.
Stream s m t =&gt;
ParsecT s u m a -&gt; ParsecT s u m sep -&gt; ParsecT s u m [a]
</span><a href="Text.Parsec.Combinator.html#endBy1"><span class="hs-identifier hs-var hs-var">endBy1</span></a></span></span><span> </span><span id="local-6989586621679059976"><span class="annot"><span class="annottext">ParsecT s u m a
</span><a href="#local-6989586621679059976"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span id="local-6989586621679059975"><span class="annot"><span class="annottext">ParsecT s u m sep
</span><a href="#local-6989586621679059975"><span class="hs-identifier hs-var">sep</span></a></span></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ParsecT s u m a -&gt; ParsecT s u m [a]
forall s (m :: * -&gt; *) t u a.
Stream s m t =&gt;
ParsecT s u m a -&gt; ParsecT s u m [a]
</span><a href="Text.Parsec.Combinator.html#many1"><span class="hs-identifier hs-var">many1</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-keyword">do</span><span class="hs-special">{</span><span> </span><span id="local-6989586621679059974"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679059974"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">ParsecT s u m a
</span><a href="#local-6989586621679059976"><span class="hs-identifier hs-var">p</span></a></span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">sep
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">ParsecT s u m sep
</span><a href="#local-6989586621679059975"><span class="hs-identifier hs-var">sep</span></a></span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">a -&gt; ParsecT s u m a
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679059974"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-177"></span><span>
</span><span id="line-178"></span><span class="hs-comment">-- | @endBy p sep@ parses /zero/ or more occurrences of @p@, separated</span><span>
</span><span id="line-179"></span><span class="hs-comment">-- and ended by @sep@. Returns a list of values returned by @p@.</span><span>
</span><span id="line-180"></span><span class="hs-comment">--</span><span>
</span><span id="line-181"></span><span class="hs-comment">-- &gt;   cStatements  = cStatement `endBy` semi</span><span>
</span><span id="line-182"></span><span>
</span><span id="line-183"></span><span id="local-6989586621679059968"><span id="local-6989586621679059969"><span id="local-6989586621679059970"><span id="local-6989586621679059971"><span id="local-6989586621679059972"><span id="local-6989586621679059973"><span class="annot"><a href="Text.Parsec.Combinator.html#endBy"><span class="hs-identifier hs-type">endBy</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Text.Parsec.Prim.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679059973"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679059972"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679059971"><span class="hs-identifier hs-type">t</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="Text.Parsec.Prim.html#ParsecT"><span class="hs-identifier hs-type">ParsecT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679059973"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679059970"><span class="hs-identifier hs-type">u</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679059972"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679059969"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Text.Parsec.Prim.html#ParsecT"><span class="hs-identifier hs-type">ParsecT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679059973"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679059970"><span class="hs-identifier hs-type">u</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679059972"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679059968"><span class="hs-identifier hs-type">sep</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Text.Parsec.Prim.html#ParsecT"><span class="hs-identifier hs-type">ParsecT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679059973"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679059970"><span class="hs-identifier hs-type">u</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679059972"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679059969"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span></span></span></span></span></span></span><span>
</span><span id="line-184"></span><span class="hs-pragma">{-# INLINABLE</span><span> </span><span class="annot"><a href="Text.Parsec.Combinator.html#endBy"><span class="hs-pragma hs-type">endBy</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-185"></span><span id="endBy"><span class="annot"><span class="annottext">endBy :: forall s (m :: * -&gt; *) t u a sep.
Stream s m t =&gt;
ParsecT s u m a -&gt; ParsecT s u m sep -&gt; ParsecT s u m [a]
</span><a href="Text.Parsec.Combinator.html#endBy"><span class="hs-identifier hs-var hs-var">endBy</span></a></span></span><span> </span><span id="local-6989586621679059963"><span class="annot"><span class="annottext">ParsecT s u m a
</span><a href="#local-6989586621679059963"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span id="local-6989586621679059962"><span class="annot"><span class="annottext">ParsecT s u m sep
</span><a href="#local-6989586621679059962"><span class="hs-identifier hs-var">sep</span></a></span></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ParsecT s u m a -&gt; ParsecT s u m [a]
forall s u (m :: * -&gt; *) a. ParsecT s u m a -&gt; ParsecT s u m [a]
</span><a href="Text.Parsec.Prim.html#many"><span class="hs-identifier hs-var">many</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-keyword">do</span><span class="hs-special">{</span><span> </span><span id="local-6989586621679059961"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679059961"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">ParsecT s u m a
</span><a href="#local-6989586621679059963"><span class="hs-identifier hs-var">p</span></a></span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">sep
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">ParsecT s u m sep
</span><a href="#local-6989586621679059962"><span class="hs-identifier hs-var">sep</span></a></span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">a -&gt; ParsecT s u m a
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679059961"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-186"></span><span>
</span><span id="line-187"></span><span class="hs-comment">-- | @count n p@ parses @n@ occurrences of @p@. If @n@ is smaller or</span><span>
</span><span id="line-188"></span><span class="hs-comment">-- equal to zero, the parser equals to @return []@. Returns a list of</span><span>
</span><span id="line-189"></span><span class="hs-comment">-- @n@ values returned by @p@.</span><span>
</span><span id="line-190"></span><span>
</span><span id="line-191"></span><span id="local-6989586621679060234"><span id="local-6989586621679060235"><span id="local-6989586621679060236"><span id="local-6989586621679060237"><span id="local-6989586621679060238"><span class="annot"><a href="Text.Parsec.Combinator.html#count"><span class="hs-identifier hs-type">count</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Text.Parsec.Prim.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060238"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060237"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060236"><span class="hs-identifier hs-type">t</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Text.Parsec.Prim.html#ParsecT"><span class="hs-identifier hs-type">ParsecT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060238"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060235"><span class="hs-identifier hs-type">u</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060237"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060234"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Text.Parsec.Prim.html#ParsecT"><span class="hs-identifier hs-type">ParsecT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060238"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060235"><span class="hs-identifier hs-type">u</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060237"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679060234"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span></span></span></span></span></span><span>
</span><span id="line-192"></span><span class="hs-pragma">{-# INLINABLE</span><span> </span><span class="annot"><a href="Text.Parsec.Combinator.html#count"><span class="hs-pragma hs-type">count</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-193"></span><span id="count"><span class="annot"><span class="annottext">count :: forall s (m :: * -&gt; *) t u a.
Stream s m t =&gt;
Int -&gt; ParsecT s u m a -&gt; ParsecT s u m [a]
</span><a href="Text.Parsec.Combinator.html#count"><span class="hs-identifier hs-var hs-var">count</span></a></span></span><span> </span><span id="local-6989586621679059951"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679059951"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span id="local-6989586621679059950"><span class="annot"><span class="annottext">ParsecT s u m a
</span><a href="#local-6989586621679059950"><span class="hs-identifier hs-var">p</span></a></span></span><span>           </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679059951"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&lt;=</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[a] -&gt; ParsecT s u m [a]
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-194"></span><span>                    </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[ParsecT s u m a] -&gt; ParsecT s u m [a]
forall (t :: * -&gt; *) (m :: * -&gt; *) a.
(Traversable t, Monad m) =&gt;
t (m a) -&gt; m (t a)
</span><a href="../../base/src/Data.Traversable.html#sequence"><span class="hs-identifier hs-var">sequence</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; ParsecT s u m a -&gt; [ParsecT s u m a]
forall a. Int -&gt; a -&gt; [a]
</span><a href="../../base/src/GHC.List.html#replicate"><span class="hs-identifier hs-var">replicate</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679059951"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">ParsecT s u m a
</span><a href="#local-6989586621679059950"><span class="hs-identifier hs-var">p</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-195"></span><span>
</span><span id="line-196"></span><span class="hs-comment">-- | @chainr p op x@ parses /zero/ or more occurrences of @p@,</span><span>
</span><span id="line-197"></span><span class="hs-comment">-- separated by @op@ Returns a value obtained by a /right/ associative</span><span>
</span><span id="line-198"></span><span class="hs-comment">-- application of all functions returned by @op@ to the values returned</span><span>
</span><span id="line-199"></span><span class="hs-comment">-- by @p@. If there are no occurrences of @p@, the value @x@ is</span><span>
</span><span id="line-200"></span><span class="hs-comment">-- returned.</span><span>
</span><span id="line-201"></span><span>
</span><span id="line-202"></span><span id="local-6989586621679060219"><span id="local-6989586621679060220"><span id="local-6989586621679060221"><span id="local-6989586621679060222"><span id="local-6989586621679060223"><span class="annot"><a href="Text.Parsec.Combinator.html#chainr"><span class="hs-identifier hs-type">chainr</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Text.Parsec.Prim.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060223"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060222"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060221"><span class="hs-identifier hs-type">t</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="Text.Parsec.Prim.html#ParsecT"><span class="hs-identifier hs-type">ParsecT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060223"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060220"><span class="hs-identifier hs-type">u</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060222"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060219"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Text.Parsec.Prim.html#ParsecT"><span class="hs-identifier hs-type">ParsecT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060223"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060220"><span class="hs-identifier hs-type">u</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060222"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679060219"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679060219"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679060219"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679060219"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Text.Parsec.Prim.html#ParsecT"><span class="hs-identifier hs-type">ParsecT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060223"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060220"><span class="hs-identifier hs-type">u</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060222"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060219"><span class="hs-identifier hs-type">a</span></a></span></span></span></span></span></span><span>
</span><span id="line-203"></span><span class="hs-pragma">{-# INLINABLE</span><span> </span><span class="annot"><a href="Text.Parsec.Combinator.html#chainr"><span class="hs-pragma hs-type">chainr</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-204"></span><span id="chainr"><span class="annot"><span class="annottext">chainr :: forall s (m :: * -&gt; *) t u a.
Stream s m t =&gt;
ParsecT s u m a
-&gt; ParsecT s u m (a -&gt; a -&gt; a) -&gt; a -&gt; ParsecT s u m a
</span><a href="Text.Parsec.Combinator.html#chainr"><span class="hs-identifier hs-var hs-var">chainr</span></a></span></span><span> </span><span id="local-6989586621679059943"><span class="annot"><span class="annottext">ParsecT s u m a
</span><a href="#local-6989586621679059943"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span id="local-6989586621679059942"><span class="annot"><span class="annottext">ParsecT s u m (a -&gt; a -&gt; a)
</span><a href="#local-6989586621679059942"><span class="hs-identifier hs-var">op</span></a></span></span><span> </span><span id="local-6989586621679059941"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679059941"><span class="hs-identifier hs-var">x</span></a></span></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ParsecT s u m a -&gt; ParsecT s u m (a -&gt; a -&gt; a) -&gt; ParsecT s u m a
forall s (m :: * -&gt; *) t u a.
Stream s m t =&gt;
ParsecT s u m a -&gt; ParsecT s u m (a -&gt; a -&gt; a) -&gt; ParsecT s u m a
</span><a href="Text.Parsec.Combinator.html#chainr1"><span class="hs-identifier hs-var">chainr1</span></a></span><span> </span><span class="annot"><span class="annottext">ParsecT s u m a
</span><a href="#local-6989586621679059943"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">ParsecT s u m (a -&gt; a -&gt; a)
</span><a href="#local-6989586621679059942"><span class="hs-identifier hs-var">op</span></a></span><span> </span><span class="annot"><span class="annottext">ParsecT s u m a -&gt; ParsecT s u m a -&gt; ParsecT s u m a
forall s u (m :: * -&gt; *) a.
ParsecT s u m a -&gt; ParsecT s u m a -&gt; ParsecT s u m a
</span><a href="Text.Parsec.Prim.html#%3C%7C%3E"><span class="hs-operator hs-var">&lt;|&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; ParsecT s u m a
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679059941"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-205"></span><span>
</span><span id="line-206"></span><span class="hs-comment">-- | @chainl p op x@ parses /zero/ or more occurrences of @p@,</span><span>
</span><span id="line-207"></span><span class="hs-comment">-- separated by @op@. Returns a value obtained by a /left/ associative</span><span>
</span><span id="line-208"></span><span class="hs-comment">-- application of all functions returned by @op@ to the values returned</span><span>
</span><span id="line-209"></span><span class="hs-comment">-- by @p@. If there are zero occurrences of @p@, the value @x@ is</span><span>
</span><span id="line-210"></span><span class="hs-comment">-- returned.</span><span>
</span><span id="line-211"></span><span>
</span><span id="line-212"></span><span id="local-6989586621679059936"><span id="local-6989586621679059937"><span id="local-6989586621679059938"><span id="local-6989586621679059939"><span id="local-6989586621679059940"><span class="annot"><a href="Text.Parsec.Combinator.html#chainl"><span class="hs-identifier hs-type">chainl</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Text.Parsec.Prim.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679059940"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679059939"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679059938"><span class="hs-identifier hs-type">t</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="Text.Parsec.Prim.html#ParsecT"><span class="hs-identifier hs-type">ParsecT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679059940"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679059937"><span class="hs-identifier hs-type">u</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679059939"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679059936"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Text.Parsec.Prim.html#ParsecT"><span class="hs-identifier hs-type">ParsecT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679059940"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679059937"><span class="hs-identifier hs-type">u</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679059939"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679059936"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679059936"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679059936"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679059936"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Text.Parsec.Prim.html#ParsecT"><span class="hs-identifier hs-type">ParsecT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679059940"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679059937"><span class="hs-identifier hs-type">u</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679059939"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679059936"><span class="hs-identifier hs-type">a</span></a></span></span></span></span></span></span><span>
</span><span id="line-213"></span><span class="hs-pragma">{-# INLINABLE</span><span> </span><span class="annot"><a href="Text.Parsec.Combinator.html#chainl"><span class="hs-pragma hs-type">chainl</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-214"></span><span id="chainl"><span class="annot"><span class="annottext">chainl :: forall s (m :: * -&gt; *) t u a.
Stream s m t =&gt;
ParsecT s u m a
-&gt; ParsecT s u m (a -&gt; a -&gt; a) -&gt; a -&gt; ParsecT s u m a
</span><a href="Text.Parsec.Combinator.html#chainl"><span class="hs-identifier hs-var hs-var">chainl</span></a></span></span><span> </span><span id="local-6989586621679059932"><span class="annot"><span class="annottext">ParsecT s u m a
</span><a href="#local-6989586621679059932"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span id="local-6989586621679059931"><span class="annot"><span class="annottext">ParsecT s u m (a -&gt; a -&gt; a)
</span><a href="#local-6989586621679059931"><span class="hs-identifier hs-var">op</span></a></span></span><span> </span><span id="local-6989586621679059930"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679059930"><span class="hs-identifier hs-var">x</span></a></span></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ParsecT s u m a -&gt; ParsecT s u m (a -&gt; a -&gt; a) -&gt; ParsecT s u m a
forall s (m :: * -&gt; *) t u a.
Stream s m t =&gt;
ParsecT s u m a -&gt; ParsecT s u m (a -&gt; a -&gt; a) -&gt; ParsecT s u m a
</span><a href="Text.Parsec.Combinator.html#chainl1"><span class="hs-identifier hs-var">chainl1</span></a></span><span> </span><span class="annot"><span class="annottext">ParsecT s u m a
</span><a href="#local-6989586621679059932"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">ParsecT s u m (a -&gt; a -&gt; a)
</span><a href="#local-6989586621679059931"><span class="hs-identifier hs-var">op</span></a></span><span> </span><span class="annot"><span class="annottext">ParsecT s u m a -&gt; ParsecT s u m a -&gt; ParsecT s u m a
forall s u (m :: * -&gt; *) a.
ParsecT s u m a -&gt; ParsecT s u m a -&gt; ParsecT s u m a
</span><a href="Text.Parsec.Prim.html#%3C%7C%3E"><span class="hs-operator hs-var">&lt;|&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; ParsecT s u m a
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679059930"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-215"></span><span>
</span><span id="line-216"></span><span class="hs-comment">-- | @chainl1 p op@ parses /one/ or more occurrences of @p@,</span><span>
</span><span id="line-217"></span><span class="hs-comment">-- separated by @op@ Returns a value obtained by a /left/ associative</span><span>
</span><span id="line-218"></span><span class="hs-comment">-- application of all functions returned by @op@ to the values returned</span><span>
</span><span id="line-219"></span><span class="hs-comment">-- by @p@. This parser can for example be used to eliminate left</span><span>
</span><span id="line-220"></span><span class="hs-comment">-- recursion which typically occurs in expression grammars.</span><span>
</span><span id="line-221"></span><span class="hs-comment">--</span><span>
</span><span id="line-222"></span><span class="hs-comment">-- &gt;  expr    = term   `chainl1` addop</span><span>
</span><span id="line-223"></span><span class="hs-comment">-- &gt;  term    = factor `chainl1` mulop</span><span>
</span><span id="line-224"></span><span class="hs-comment">-- &gt;  factor  = parens expr &lt;|&gt; integer</span><span>
</span><span id="line-225"></span><span class="hs-comment">-- &gt;</span><span>
</span><span id="line-226"></span><span class="hs-comment">-- &gt;  mulop   =   do{ symbol &quot;*&quot;; return (*)   }</span><span>
</span><span id="line-227"></span><span class="hs-comment">-- &gt;          &lt;|&gt; do{ symbol &quot;/&quot;; return (div) }</span><span>
</span><span id="line-228"></span><span class="hs-comment">-- &gt;</span><span>
</span><span id="line-229"></span><span class="hs-comment">-- &gt;  addop   =   do{ symbol &quot;+&quot;; return (+) }</span><span>
</span><span id="line-230"></span><span class="hs-comment">-- &gt;          &lt;|&gt; do{ symbol &quot;-&quot;; return (-) }</span><span>
</span><span id="line-231"></span><span>
</span><span id="line-232"></span><span id="local-6989586621679059925"><span id="local-6989586621679059926"><span id="local-6989586621679059927"><span id="local-6989586621679059928"><span id="local-6989586621679059929"><span class="annot"><a href="Text.Parsec.Combinator.html#chainl1"><span class="hs-identifier hs-type">chainl1</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Text.Parsec.Prim.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679059929"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679059928"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679059927"><span class="hs-identifier hs-type">t</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="Text.Parsec.Prim.html#ParsecT"><span class="hs-identifier hs-type">ParsecT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679059929"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679059926"><span class="hs-identifier hs-type">u</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679059928"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679059925"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Text.Parsec.Prim.html#ParsecT"><span class="hs-identifier hs-type">ParsecT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679059929"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679059926"><span class="hs-identifier hs-type">u</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679059928"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679059925"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679059925"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679059925"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Text.Parsec.Prim.html#ParsecT"><span class="hs-identifier hs-type">ParsecT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679059929"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679059926"><span class="hs-identifier hs-type">u</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679059928"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679059925"><span class="hs-identifier hs-type">a</span></a></span></span></span></span></span></span><span>
</span><span id="line-233"></span><span class="hs-pragma">{-# INLINABLE</span><span> </span><span class="annot"><a href="Text.Parsec.Combinator.html#chainl1"><span class="hs-pragma hs-type">chainl1</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-234"></span><span id="chainl1"><span class="annot"><span class="annottext">chainl1 :: forall s (m :: * -&gt; *) t u a.
Stream s m t =&gt;
ParsecT s u m a -&gt; ParsecT s u m (a -&gt; a -&gt; a) -&gt; ParsecT s u m a
</span><a href="Text.Parsec.Combinator.html#chainl1"><span class="hs-identifier hs-var hs-var">chainl1</span></a></span></span><span> </span><span id="local-6989586621679059922"><span class="annot"><span class="annottext">ParsecT s u m a
</span><a href="#local-6989586621679059922"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span id="local-6989586621679059921"><span class="annot"><span class="annottext">ParsecT s u m (a -&gt; a -&gt; a)
</span><a href="#local-6989586621679059921"><span class="hs-identifier hs-var">op</span></a></span></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span class="hs-special">{</span><span> </span><span id="local-6989586621679059920"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679059920"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">ParsecT s u m a
</span><a href="#local-6989586621679059922"><span class="hs-identifier hs-var">p</span></a></span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">a -&gt; ParsecT s u m a
</span><a href="#local-6989586621679059919"><span class="hs-identifier hs-var">rest</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679059920"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-235"></span><span>                    </span><span class="hs-keyword">where</span><span>
</span><span id="line-236"></span><span>                      </span><span id="local-6989586621679059919"><span class="annot"><span class="annottext">rest :: a -&gt; ParsecT s u m a
</span><a href="#local-6989586621679059919"><span class="hs-identifier hs-var hs-var">rest</span></a></span></span><span> </span><span id="local-6989586621679059915"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679059915"><span class="hs-identifier hs-var">x</span></a></span></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span class="hs-special">{</span><span> </span><span id="local-6989586621679059914"><span class="annot"><span class="annottext">a -&gt; a -&gt; a
</span><a href="#local-6989586621679059914"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">ParsecT s u m (a -&gt; a -&gt; a)
</span><a href="#local-6989586621679059921"><span class="hs-identifier hs-var">op</span></a></span><span>
</span><span id="line-237"></span><span>                                    </span><span class="hs-special">;</span><span> </span><span id="local-6989586621679059913"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679059913"><span class="hs-identifier hs-var">y</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">ParsecT s u m a
</span><a href="#local-6989586621679059922"><span class="hs-identifier hs-var">p</span></a></span><span>
</span><span id="line-238"></span><span>                                    </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">a -&gt; ParsecT s u m a
</span><a href="#local-6989586621679059919"><span class="hs-identifier hs-var">rest</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
</span><a href="#local-6989586621679059914"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679059915"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679059913"><span class="hs-identifier hs-var">y</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-239"></span><span>                                    </span><span class="hs-special">}</span><span>
</span><span id="line-240"></span><span>                                </span><span class="annot"><span class="annottext">ParsecT s u m a -&gt; ParsecT s u m a -&gt; ParsecT s u m a
forall s u (m :: * -&gt; *) a.
ParsecT s u m a -&gt; ParsecT s u m a -&gt; ParsecT s u m a
</span><a href="Text.Parsec.Prim.html#%3C%7C%3E"><span class="hs-operator hs-var">&lt;|&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; ParsecT s u m a
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679059915"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-241"></span><span>
</span><span id="line-242"></span><span class="hs-comment">-- | @chainr1 p op x@ parses /one/ or more occurrences of |p|,</span><span>
</span><span id="line-243"></span><span class="hs-comment">-- separated by @op@ Returns a value obtained by a /right/ associative</span><span>
</span><span id="line-244"></span><span class="hs-comment">-- application of all functions returned by @op@ to the values returned</span><span>
</span><span id="line-245"></span><span class="hs-comment">-- by @p@.</span><span>
</span><span id="line-246"></span><span>
</span><span id="line-247"></span><span id="local-6989586621679060209"><span id="local-6989586621679060210"><span id="local-6989586621679060211"><span id="local-6989586621679060212"><span id="local-6989586621679060213"><span class="annot"><a href="Text.Parsec.Combinator.html#chainr1"><span class="hs-identifier hs-type">chainr1</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Text.Parsec.Prim.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060213"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060212"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060211"><span class="hs-identifier hs-type">t</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="Text.Parsec.Prim.html#ParsecT"><span class="hs-identifier hs-type">ParsecT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060213"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060210"><span class="hs-identifier hs-type">u</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060212"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060209"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Text.Parsec.Prim.html#ParsecT"><span class="hs-identifier hs-type">ParsecT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060213"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060210"><span class="hs-identifier hs-type">u</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060212"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679060209"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679060209"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679060209"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Text.Parsec.Prim.html#ParsecT"><span class="hs-identifier hs-type">ParsecT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060213"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060210"><span class="hs-identifier hs-type">u</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060212"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060209"><span class="hs-identifier hs-type">a</span></a></span></span></span></span></span></span><span>
</span><span id="line-248"></span><span class="hs-pragma">{-# INLINABLE</span><span> </span><span class="annot"><a href="Text.Parsec.Combinator.html#chainr1"><span class="hs-pragma hs-type">chainr1</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-249"></span><span id="chainr1"><span class="annot"><span class="annottext">chainr1 :: forall s (m :: * -&gt; *) t u a.
Stream s m t =&gt;
ParsecT s u m a -&gt; ParsecT s u m (a -&gt; a -&gt; a) -&gt; ParsecT s u m a
</span><a href="Text.Parsec.Combinator.html#chainr1"><span class="hs-identifier hs-var hs-var">chainr1</span></a></span></span><span> </span><span id="local-6989586621679059911"><span class="annot"><span class="annottext">ParsecT s u m a
</span><a href="#local-6989586621679059911"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span id="local-6989586621679059910"><span class="annot"><span class="annottext">ParsecT s u m (a -&gt; a -&gt; a)
</span><a href="#local-6989586621679059910"><span class="hs-identifier hs-var">op</span></a></span></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ParsecT s u m a
</span><a href="#local-6989586621679059909"><span class="hs-identifier hs-var">scan</span></a></span><span>
</span><span id="line-250"></span><span>                    </span><span class="hs-keyword">where</span><span>
</span><span id="line-251"></span><span>                      </span><span id="local-6989586621679059909"><span class="annot"><span class="annottext">scan :: ParsecT s u m a
</span><a href="#local-6989586621679059909"><span class="hs-identifier hs-var hs-var">scan</span></a></span></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span class="hs-special">{</span><span> </span><span id="local-6989586621679059903"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679059903"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">ParsecT s u m a
</span><a href="#local-6989586621679059911"><span class="hs-identifier hs-var">p</span></a></span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">a -&gt; ParsecT s u m a
</span><a href="#local-6989586621679059902"><span class="hs-identifier hs-var">rest</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679059903"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-252"></span><span>
</span><span id="line-253"></span><span>                      </span><span id="local-6989586621679059902"><span class="annot"><span class="annottext">rest :: a -&gt; ParsecT s u m a
</span><a href="#local-6989586621679059902"><span class="hs-identifier hs-var hs-var">rest</span></a></span></span><span> </span><span id="local-6989586621679059901"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679059901"><span class="hs-identifier hs-var">x</span></a></span></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span class="hs-special">{</span><span> </span><span id="local-6989586621679059900"><span class="annot"><span class="annottext">a -&gt; a -&gt; a
</span><a href="#local-6989586621679059900"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">ParsecT s u m (a -&gt; a -&gt; a)
</span><a href="#local-6989586621679059910"><span class="hs-identifier hs-var">op</span></a></span><span>
</span><span id="line-254"></span><span>                                    </span><span class="hs-special">;</span><span> </span><span id="local-6989586621679059899"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679059899"><span class="hs-identifier hs-var">y</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">ParsecT s u m a
</span><a href="#local-6989586621679059909"><span class="hs-identifier hs-var">scan</span></a></span><span>
</span><span id="line-255"></span><span>                                    </span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">a -&gt; ParsecT s u m a
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
</span><a href="#local-6989586621679059900"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679059901"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679059899"><span class="hs-identifier hs-var">y</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-256"></span><span>                                    </span><span class="hs-special">}</span><span>
</span><span id="line-257"></span><span>                                </span><span class="annot"><span class="annottext">ParsecT s u m a -&gt; ParsecT s u m a -&gt; ParsecT s u m a
forall s u (m :: * -&gt; *) a.
ParsecT s u m a -&gt; ParsecT s u m a -&gt; ParsecT s u m a
</span><a href="Text.Parsec.Prim.html#%3C%7C%3E"><span class="hs-operator hs-var">&lt;|&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; ParsecT s u m a
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679059901"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-258"></span><span>
</span><span id="line-259"></span><span class="hs-comment">-----------------------------------------------------------</span><span>
</span><span id="line-260"></span><span class="hs-comment">-- Tricky combinators</span><span>
</span><span id="line-261"></span><span class="hs-comment">-----------------------------------------------------------</span><span>
</span><span id="line-262"></span><span class="hs-comment">-- | The parser @anyToken@ accepts any kind of token. It is for example</span><span>
</span><span id="line-263"></span><span class="hs-comment">-- used to implement 'eof'. Returns the accepted token.</span><span>
</span><span id="line-264"></span><span>
</span><span id="line-265"></span><span id="local-6989586621679060190"><span id="local-6989586621679060191"><span id="local-6989586621679060192"><span id="local-6989586621679060193"><span class="annot"><a href="Text.Parsec.Combinator.html#anyToken"><span class="hs-identifier hs-type">anyToken</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Text.Parsec.Prim.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060193"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060192"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060191"><span class="hs-identifier hs-type">t</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Show.html#Show"><span class="hs-identifier hs-type">Show</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060191"><span class="hs-identifier hs-type">t</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="Text.Parsec.Prim.html#ParsecT"><span class="hs-identifier hs-type">ParsecT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060193"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060190"><span class="hs-identifier hs-type">u</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060192"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060191"><span class="hs-identifier hs-type">t</span></a></span></span></span></span></span><span>
</span><span id="line-266"></span><span class="hs-pragma">{-# INLINABLE</span><span> </span><span class="annot"><a href="Text.Parsec.Combinator.html#anyToken"><span class="hs-pragma hs-type">anyToken</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-267"></span><span id="anyToken"><span class="annot"><span class="annottext">anyToken :: forall s (m :: * -&gt; *) t u.
(Stream s m t, Show t) =&gt;
ParsecT s u m t
</span><a href="Text.Parsec.Combinator.html#anyToken"><span class="hs-identifier hs-var hs-var">anyToken</span></a></span></span><span>            </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(t -&gt; String)
-&gt; (SourcePos -&gt; t -&gt; s -&gt; SourcePos)
-&gt; (t -&gt; Maybe t)
-&gt; ParsecT s u m t
forall s (m :: * -&gt; *) t a u.
Stream s m t =&gt;
(t -&gt; String)
-&gt; (SourcePos -&gt; t -&gt; s -&gt; SourcePos)
-&gt; (t -&gt; Maybe a)
-&gt; ParsecT s u m a
</span><a href="Text.Parsec.Prim.html#tokenPrim"><span class="hs-identifier hs-var">tokenPrim</span></a></span><span> </span><span class="annot"><span class="annottext">t -&gt; String
forall a. Show a =&gt; a -&gt; String
</span><a href="../../base/src/GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621679059892"><span class="annot"><span class="annottext">SourcePos
</span><a href="#local-6989586621679059892"><span class="hs-identifier hs-var">pos</span></a></span></span><span> </span><span id="local-6989586621679059891"><span class="annot"><span class="annottext">t
</span><a href="#local-6989586621679059891"><span class="hs-identifier hs-var">_tok</span></a></span></span><span> </span><span id="local-6989586621679059890"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679059890"><span class="hs-identifier hs-var">_toks</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">SourcePos
</span><a href="#local-6989586621679059892"><span class="hs-identifier hs-var">pos</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">t -&gt; Maybe t
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span>
</span><span id="line-268"></span><span>
</span><span id="line-269"></span><span class="hs-comment">-- | This parser only succeeds at the end of the input. This is not a</span><span>
</span><span id="line-270"></span><span class="hs-comment">-- primitive parser but it is defined using 'notFollowedBy'.</span><span>
</span><span id="line-271"></span><span class="hs-comment">--</span><span>
</span><span id="line-272"></span><span class="hs-comment">-- &gt;  eof  = notFollowedBy anyToken &lt;?&gt; &quot;end of input&quot;</span><span>
</span><span id="line-273"></span><span>
</span><span id="line-274"></span><span id="local-6989586621679060175"><span id="local-6989586621679060176"><span id="local-6989586621679060177"><span id="local-6989586621679060178"><span class="annot"><a href="Text.Parsec.Combinator.html#eof"><span class="hs-identifier hs-type">eof</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Text.Parsec.Prim.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060178"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060177"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060176"><span class="hs-identifier hs-type">t</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Show.html#Show"><span class="hs-identifier hs-type">Show</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060176"><span class="hs-identifier hs-type">t</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="Text.Parsec.Prim.html#ParsecT"><span class="hs-identifier hs-type">ParsecT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060178"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060175"><span class="hs-identifier hs-type">u</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060177"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span></span></span></span></span><span>
</span><span id="line-275"></span><span class="hs-pragma">{-# INLINABLE</span><span> </span><span class="annot"><a href="Text.Parsec.Combinator.html#eof"><span class="hs-pragma hs-type">eof</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-276"></span><span id="eof"><span class="annot"><span class="annottext">eof :: forall s (m :: * -&gt; *) t u.
(Stream s m t, Show t) =&gt;
ParsecT s u m ()
</span><a href="Text.Parsec.Combinator.html#eof"><span class="hs-identifier hs-var hs-var">eof</span></a></span></span><span>                 </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ParsecT s u m t -&gt; ParsecT s u m ()
forall s (m :: * -&gt; *) t a u.
(Stream s m t, Show a) =&gt;
ParsecT s u m a -&gt; ParsecT s u m ()
</span><a href="Text.Parsec.Combinator.html#notFollowedBy"><span class="hs-identifier hs-var">notFollowedBy</span></a></span><span> </span><span class="annot"><span class="annottext">ParsecT s u m t
forall s (m :: * -&gt; *) t u.
(Stream s m t, Show t) =&gt;
ParsecT s u m t
</span><a href="Text.Parsec.Combinator.html#anyToken"><span class="hs-identifier hs-var">anyToken</span></a></span><span> </span><span class="annot"><span class="annottext">ParsecT s u m () -&gt; String -&gt; ParsecT s u m ()
forall s u (m :: * -&gt; *) a.
ParsecT s u m a -&gt; String -&gt; ParsecT s u m a
</span><a href="Text.Parsec.Prim.html#%3C%3F%3E"><span class="hs-operator hs-var">&lt;?&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;end of input&quot;</span></span><span>
</span><span id="line-277"></span><span>
</span><span id="line-278"></span><span class="hs-comment">-- | @notFollowedBy p@ only succeeds when parser @p@ fails. This parser</span><span>
</span><span id="line-279"></span><span class="hs-comment">-- does not consume any input. This parser can be used to implement the</span><span>
</span><span id="line-280"></span><span class="hs-comment">-- \'longest match\' rule. For example, when recognizing keywords (for</span><span>
</span><span id="line-281"></span><span class="hs-comment">-- example @let@), we want to make sure that a keyword is not followed</span><span>
</span><span id="line-282"></span><span class="hs-comment">-- by a legal identifier character, in which case the keyword is</span><span>
</span><span id="line-283"></span><span class="hs-comment">-- actually an identifier (for example @lets@). We can program this</span><span>
</span><span id="line-284"></span><span class="hs-comment">-- behaviour as follows:</span><span>
</span><span id="line-285"></span><span class="hs-comment">--</span><span>
</span><span id="line-286"></span><span class="hs-comment">-- &gt;  keywordLet  = try (do{ string &quot;let&quot;</span><span>
</span><span id="line-287"></span><span class="hs-comment">-- &gt;                       ; notFollowedBy alphaNum</span><span>
</span><span id="line-288"></span><span class="hs-comment">-- &gt;                       })</span><span>
</span><span id="line-289"></span><span class="hs-comment">--</span><span>
</span><span id="line-290"></span><span class="hs-comment">-- __NOTE__: Currently, 'notFollowedBy' exhibits surprising behaviour</span><span>
</span><span id="line-291"></span><span class="hs-comment">-- when applied to a parser @p@ that doesn't consume any input;</span><span>
</span><span id="line-292"></span><span class="hs-comment">-- specifically</span><span>
</span><span id="line-293"></span><span class="hs-comment">--</span><span>
</span><span id="line-294"></span><span class="hs-comment">--  - @'notFollowedBy' . 'notFollowedBy'@ is /not/ equivalent to 'lookAhead', and</span><span>
</span><span id="line-295"></span><span class="hs-comment">--</span><span>
</span><span id="line-296"></span><span class="hs-comment">--  - @'notFollowedBy' 'eof'@ /never/ fails.</span><span>
</span><span id="line-297"></span><span class="hs-comment">--</span><span>
</span><span id="line-298"></span><span class="hs-comment">-- See [haskell/parsec#8](https://github.com/haskell/parsec/issues/8)</span><span>
</span><span id="line-299"></span><span class="hs-comment">-- for more details.</span><span>
</span><span id="line-300"></span><span>
</span><span id="line-301"></span><span id="local-6989586621679060166"><span id="local-6989586621679060167"><span id="local-6989586621679060168"><span id="local-6989586621679060169"><span id="local-6989586621679060170"><span class="annot"><a href="Text.Parsec.Combinator.html#notFollowedBy"><span class="hs-identifier hs-type">notFollowedBy</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Text.Parsec.Prim.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060170"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060169"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060168"><span class="hs-identifier hs-type">t</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Show.html#Show"><span class="hs-identifier hs-type">Show</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060167"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="Text.Parsec.Prim.html#ParsecT"><span class="hs-identifier hs-type">ParsecT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060170"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060166"><span class="hs-identifier hs-type">u</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060169"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060167"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Text.Parsec.Prim.html#ParsecT"><span class="hs-identifier hs-type">ParsecT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060170"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060166"><span class="hs-identifier hs-type">u</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060169"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span></span></span></span></span></span><span>
</span><span id="line-302"></span><span class="hs-pragma">{-# INLINABLE</span><span> </span><span class="annot"><a href="Text.Parsec.Combinator.html#notFollowedBy"><span class="hs-pragma hs-type">notFollowedBy</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-303"></span><span id="notFollowedBy"><span class="annot"><span class="annottext">notFollowedBy :: forall s (m :: * -&gt; *) t a u.
(Stream s m t, Show a) =&gt;
ParsecT s u m a -&gt; ParsecT s u m ()
</span><a href="Text.Parsec.Combinator.html#notFollowedBy"><span class="hs-identifier hs-var hs-var">notFollowedBy</span></a></span></span><span> </span><span id="local-6989586621679059876"><span class="annot"><span class="annottext">ParsecT s u m a
</span><a href="#local-6989586621679059876"><span class="hs-identifier hs-var">p</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ParsecT s u m () -&gt; ParsecT s u m ()
forall s u (m :: * -&gt; *) a. ParsecT s u m a -&gt; ParsecT s u m a
</span><a href="Text.Parsec.Prim.html#try"><span class="hs-identifier hs-var">try</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-keyword">do</span><span class="hs-special">{</span><span> </span><span id="local-6989586621679059874"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679059874"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">ParsecT s u m a -&gt; ParsecT s u m a
forall s u (m :: * -&gt; *) a. ParsecT s u m a -&gt; ParsecT s u m a
</span><a href="Text.Parsec.Prim.html#try"><span class="hs-identifier hs-var">try</span></a></span><span> </span><span class="annot"><span class="annottext">ParsecT s u m a
</span><a href="#local-6989586621679059876"><span class="hs-identifier hs-var">p</span></a></span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">String -&gt; ParsecT s u m ()
forall s (m :: * -&gt; *) t u a.
Stream s m t =&gt;
String -&gt; ParsecT s u m a
</span><a href="Text.Parsec.Prim.html#unexpected"><span class="hs-identifier hs-var">unexpected</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; String
forall a. Show a =&gt; a -&gt; String
</span><a href="../../base/src/GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679059874"><span class="hs-identifier hs-var">c</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-304"></span><span>                           </span><span class="annot"><span class="annottext">ParsecT s u m () -&gt; ParsecT s u m () -&gt; ParsecT s u m ()
forall s u (m :: * -&gt; *) a.
ParsecT s u m a -&gt; ParsecT s u m a -&gt; ParsecT s u m a
</span><a href="Text.Parsec.Prim.html#%3C%7C%3E"><span class="hs-operator hs-var">&lt;|&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">() -&gt; ParsecT s u m ()
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-305"></span><span>                          </span><span class="hs-special">)</span><span>
</span><span id="line-306"></span><span>
</span><span id="line-307"></span><span class="hs-comment">-- | @manyTill p end@ applies parser @p@ /zero/ or more times until</span><span>
</span><span id="line-308"></span><span class="hs-comment">-- parser @end@ succeeds. Returns the list of values returned by @p@.</span><span>
</span><span id="line-309"></span><span class="hs-comment">-- This parser can be used to scan comments:</span><span>
</span><span id="line-310"></span><span class="hs-comment">--</span><span>
</span><span id="line-311"></span><span class="hs-comment">-- &gt;  simpleComment   = do{ string &quot;&lt;!--&quot;</span><span>
</span><span id="line-312"></span><span class="hs-comment">-- &gt;                      ; manyTill anyChar (try (string &quot;--&gt;&quot;))</span><span>
</span><span id="line-313"></span><span class="hs-comment">-- &gt;                      }</span><span>
</span><span id="line-314"></span><span class="hs-comment">--</span><span>
</span><span id="line-315"></span><span class="hs-comment">--    Note the overlapping parsers @anyChar@ and @string \&quot;--&gt;\&quot;@, and</span><span>
</span><span id="line-316"></span><span class="hs-comment">--    therefore the use of the 'try' combinator.</span><span>
</span><span id="line-317"></span><span>
</span><span id="line-318"></span><span id="local-6989586621679059867"><span id="local-6989586621679059868"><span id="local-6989586621679059869"><span id="local-6989586621679059870"><span id="local-6989586621679059871"><span id="local-6989586621679059872"><span class="annot"><a href="Text.Parsec.Combinator.html#manyTill"><span class="hs-identifier hs-type">manyTill</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Text.Parsec.Prim.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679059872"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679059871"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679059870"><span class="hs-identifier hs-type">t</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="Text.Parsec.Prim.html#ParsecT"><span class="hs-identifier hs-type">ParsecT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679059872"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679059869"><span class="hs-identifier hs-type">u</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679059871"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679059868"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Text.Parsec.Prim.html#ParsecT"><span class="hs-identifier hs-type">ParsecT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679059872"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679059869"><span class="hs-identifier hs-type">u</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679059871"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679059867"><span class="hs-identifier hs-type">end</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Text.Parsec.Prim.html#ParsecT"><span class="hs-identifier hs-type">ParsecT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679059872"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679059869"><span class="hs-identifier hs-type">u</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679059871"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679059868"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span></span></span></span></span></span></span><span>
</span><span id="line-319"></span><span class="hs-pragma">{-# INLINABLE</span><span> </span><span class="annot"><a href="Text.Parsec.Combinator.html#manyTill"><span class="hs-pragma hs-type">manyTill</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-320"></span><span id="manyTill"><span class="annot"><span class="annottext">manyTill :: forall s (m :: * -&gt; *) t u a sep.
Stream s m t =&gt;
ParsecT s u m a -&gt; ParsecT s u m sep -&gt; ParsecT s u m [a]
</span><a href="Text.Parsec.Combinator.html#manyTill"><span class="hs-identifier hs-var hs-var">manyTill</span></a></span></span><span> </span><span id="local-6989586621679059865"><span class="annot"><span class="annottext">ParsecT s u m a
</span><a href="#local-6989586621679059865"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span id="local-6989586621679059864"><span class="annot"><span class="annottext">ParsecT s u m end
</span><a href="#local-6989586621679059864"><span class="hs-identifier hs-var">end</span></a></span></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ParsecT s u m [a]
</span><a href="#local-6989586621679059863"><span class="hs-identifier hs-var">scan</span></a></span><span>
</span><span id="line-321"></span><span>                    </span><span class="hs-keyword">where</span><span>
</span><span id="line-322"></span><span>                      </span><span id="local-6989586621679059863"><span class="annot"><span class="annottext">scan :: ParsecT s u m [a]
</span><a href="#local-6989586621679059863"><span class="hs-identifier hs-var hs-var">scan</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">end
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">ParsecT s u m end
</span><a href="#local-6989586621679059864"><span class="hs-identifier hs-var">end</span></a></span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">[a] -&gt; ParsecT s u m [a]
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-323"></span><span>                            </span><span class="annot"><span class="annottext">ParsecT s u m [a] -&gt; ParsecT s u m [a] -&gt; ParsecT s u m [a]
forall s u (m :: * -&gt; *) a.
ParsecT s u m a -&gt; ParsecT s u m a -&gt; ParsecT s u m a
</span><a href="Text.Parsec.Prim.html#%3C%7C%3E"><span class="hs-operator hs-var">&lt;|&gt;</span></a></span><span>
</span><span id="line-324"></span><span>                              </span><span class="hs-keyword">do</span><span class="hs-special">{</span><span> </span><span id="local-6989586621679059857"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679059857"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">ParsecT s u m a
</span><a href="#local-6989586621679059865"><span class="hs-identifier hs-var">p</span></a></span><span class="hs-special">;</span><span> </span><span id="local-6989586621679059856"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679059856"><span class="hs-identifier hs-var">xs</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">ParsecT s u m [a]
</span><a href="#local-6989586621679059863"><span class="hs-identifier hs-var">scan</span></a></span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">[a] -&gt; ParsecT s u m [a]
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679059857"><span class="hs-identifier hs-var">x</span></a></span><span class="annot"><span class="annottext">a -&gt; [a] -&gt; [a]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679059856"><span class="hs-identifier hs-var">xs</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-325"></span><span>
</span><span id="line-326"></span><span class="hs-comment">-- | @parserTrace label@ is an impure function, implemented with &quot;Debug.Trace&quot; that</span><span>
</span><span id="line-327"></span><span class="hs-comment">-- prints to the console the remaining parser state at the time it is invoked.</span><span>
</span><span id="line-328"></span><span class="hs-comment">-- It is intended to be used for debugging parsers by inspecting their intermediate states.</span><span>
</span><span id="line-329"></span><span class="hs-comment">--</span><span>
</span><span id="line-330"></span><span class="hs-comment">-- &gt; *&gt; parseTest (oneOf &quot;aeiou&quot;  &gt;&gt; parserTrace &quot;label&quot;) &quot;atest&quot;</span><span>
</span><span id="line-331"></span><span class="hs-comment">-- &gt; label: &quot;test&quot;</span><span>
</span><span id="line-332"></span><span class="hs-comment">-- &gt; ...</span><span>
</span><span id="line-333"></span><span class="hs-comment">--</span><span>
</span><span id="line-334"></span><span class="hs-comment">-- @since 3.1.12.0</span><span>
</span><span id="line-335"></span><span id="local-6989586621679060138"><span id="local-6989586621679060139"><span id="local-6989586621679060140"><span id="local-6989586621679060141"><span class="annot"><a href="Text.Parsec.Combinator.html#parserTrace"><span class="hs-identifier hs-type">parserTrace</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Show.html#Show"><span class="hs-identifier hs-type">Show</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060141"><span class="hs-identifier hs-type">t</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Text.Parsec.Prim.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060140"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060139"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060141"><span class="hs-identifier hs-type">t</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Text.Parsec.Prim.html#ParsecT"><span class="hs-identifier hs-type">ParsecT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060140"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060138"><span class="hs-identifier hs-type">u</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060139"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span></span></span></span></span><span>
</span><span id="line-336"></span><span class="hs-pragma">{-# INLINABLE</span><span> </span><span class="annot"><a href="Text.Parsec.Combinator.html#parserTrace"><span class="hs-pragma hs-type">parserTrace</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-337"></span><span id="parserTrace"><span class="annot"><span class="annottext">parserTrace :: forall t s (m :: * -&gt; *) u.
(Show t, Stream s m t) =&gt;
String -&gt; ParsecT s u m ()
</span><a href="Text.Parsec.Combinator.html#parserTrace"><span class="hs-identifier hs-var hs-var">parserTrace</span></a></span></span><span> </span><span id="local-6989586621679059852"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679059852"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ParsecT s u m ()
forall {u} {a}. ParsecT s u m a
</span><a href="#local-6989586621679059851"><span class="hs-identifier hs-var">pt</span></a></span><span> </span><span class="annot"><span class="annottext">ParsecT s u m () -&gt; ParsecT s u m () -&gt; ParsecT s u m ()
forall s u (m :: * -&gt; *) a.
ParsecT s u m a -&gt; ParsecT s u m a -&gt; ParsecT s u m a
</span><a href="Text.Parsec.Prim.html#%3C%7C%3E"><span class="hs-operator hs-var">&lt;|&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">() -&gt; ParsecT s u m ()
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-338"></span><span>    </span><span class="hs-keyword">where</span><span>
</span><span id="line-339"></span><span>        </span><span id="local-6989586621679059851"><span class="annot"><span class="annottext">pt :: ParsecT s u m a
</span><a href="#local-6989586621679059851"><span class="hs-identifier hs-var hs-var">pt</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ParsecT s u m a -&gt; ParsecT s u m a
forall s u (m :: * -&gt; *) a. ParsecT s u m a -&gt; ParsecT s u m a
</span><a href="Text.Parsec.Prim.html#try"><span class="hs-identifier hs-var">try</span></a></span><span> </span><span class="annot"><span class="annottext">(ParsecT s u m a -&gt; ParsecT s u m a)
-&gt; ParsecT s u m a -&gt; ParsecT s u m a
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-340"></span><span>           </span><span id="local-6989586621679059838"><span class="annot"><span class="annottext">[t]
</span><a href="#local-6989586621679059838"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">ParsecT s u m [t] -&gt; ParsecT s u m [t]
forall s u (m :: * -&gt; *) a. ParsecT s u m a -&gt; ParsecT s u m a
</span><a href="Text.Parsec.Prim.html#try"><span class="hs-identifier hs-var">try</span></a></span><span> </span><span class="annot"><span class="annottext">(ParsecT s u m [t] -&gt; ParsecT s u m [t])
-&gt; ParsecT s u m [t] -&gt; ParsecT s u m [t]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">ParsecT s u m t -&gt; ParsecT s u m [t]
forall s (m :: * -&gt; *) t u a.
Stream s m t =&gt;
ParsecT s u m a -&gt; ParsecT s u m [a]
</span><a href="Text.Parsec.Combinator.html#many1"><span class="hs-identifier hs-var">many1</span></a></span><span> </span><span class="annot"><span class="annottext">ParsecT s u m t
forall s (m :: * -&gt; *) t u.
(Stream s m t, Show t) =&gt;
ParsecT s u m t
</span><a href="Text.Parsec.Combinator.html#anyToken"><span class="hs-identifier hs-var">anyToken</span></a></span><span>
</span><span id="line-341"></span><span>           </span><span class="annot"><span class="annottext">String -&gt; ParsecT s u m () -&gt; ParsecT s u m ()
forall a. String -&gt; a -&gt; a
</span><a href="../../base/src/Debug.Trace.html#trace"><span class="hs-identifier hs-var">trace</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679059852"><span class="hs-identifier hs-var">s</span></a></span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;: &quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[t] -&gt; String
forall a. Show a =&gt; a -&gt; String
</span><a href="../../base/src/GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span> </span><span class="annot"><span class="annottext">[t]
</span><a href="#local-6989586621679059838"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(ParsecT s u m () -&gt; ParsecT s u m ())
-&gt; ParsecT s u m () -&gt; ParsecT s u m ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">ParsecT s u m () -&gt; ParsecT s u m ()
forall s u (m :: * -&gt; *) a. ParsecT s u m a -&gt; ParsecT s u m a
</span><a href="Text.Parsec.Prim.html#try"><span class="hs-identifier hs-var">try</span></a></span><span> </span><span class="annot"><span class="annottext">(ParsecT s u m () -&gt; ParsecT s u m ())
-&gt; ParsecT s u m () -&gt; ParsecT s u m ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">ParsecT s u m ()
forall s (m :: * -&gt; *) t u.
(Stream s m t, Show t) =&gt;
ParsecT s u m ()
</span><a href="Text.Parsec.Combinator.html#eof"><span class="hs-identifier hs-var">eof</span></a></span><span>
</span><span id="line-342"></span><span>           </span><span class="annot"><span class="annottext">String -&gt; ParsecT s u m a
forall (m :: * -&gt; *) a. MonadFail m =&gt; String -&gt; m a
</span><a href="../../base/src/Control.Monad.Fail.html#fail"><span class="hs-identifier hs-var">fail</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[t] -&gt; String
forall a. Show a =&gt; a -&gt; String
</span><a href="../../base/src/GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span> </span><span class="annot"><span class="annottext">[t]
</span><a href="#local-6989586621679059838"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-343"></span><span>
</span><span id="line-344"></span><span class="hs-comment">-- | @parserTraced label p@ is an impure function, implemented with &quot;Debug.Trace&quot; that</span><span>
</span><span id="line-345"></span><span class="hs-comment">-- prints to the console the remaining parser state at the time it is invoked.</span><span>
</span><span id="line-346"></span><span class="hs-comment">-- It then continues to apply parser @p@, and if @p@ fails will indicate that</span><span>
</span><span id="line-347"></span><span class="hs-comment">-- the label has been backtracked.</span><span>
</span><span id="line-348"></span><span class="hs-comment">-- It is intended to be used for debugging parsers by inspecting their intermediate states.</span><span>
</span><span id="line-349"></span><span class="hs-comment">--</span><span>
</span><span id="line-350"></span><span class="hs-comment">-- &gt; *&gt;  parseTest (oneOf &quot;aeiou&quot;  &gt;&gt; parserTraced &quot;label&quot; (oneOf &quot;nope&quot;)) &quot;atest&quot;</span><span>
</span><span id="line-351"></span><span class="hs-comment">-- &gt; label: &quot;test&quot;</span><span>
</span><span id="line-352"></span><span class="hs-comment">-- &gt; label backtracked</span><span>
</span><span id="line-353"></span><span class="hs-comment">-- &gt; parse error at (line 1, column 2):</span><span>
</span><span id="line-354"></span><span class="hs-comment">-- &gt; ...</span><span>
</span><span id="line-355"></span><span class="hs-comment">--</span><span>
</span><span id="line-356"></span><span class="hs-comment">-- @since 3.1.12.0</span><span>
</span><span id="line-357"></span><span id="local-6989586621679060116"><span id="local-6989586621679060117"><span id="local-6989586621679060118"><span id="local-6989586621679060119"><span id="local-6989586621679060120"><span class="annot"><a href="Text.Parsec.Combinator.html#parserTraced"><span class="hs-identifier hs-type">parserTraced</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Text.Parsec.Prim.html#Stream"><span class="hs-identifier hs-type">Stream</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060120"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060119"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060118"><span class="hs-identifier hs-type">t</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Show.html#Show"><span class="hs-identifier hs-type">Show</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060118"><span class="hs-identifier hs-type">t</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Text.Parsec.Prim.html#ParsecT"><span class="hs-identifier hs-type">ParsecT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060120"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060117"><span class="hs-identifier hs-type">u</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060119"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060116"><span class="hs-identifier hs-type">b</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Text.Parsec.Prim.html#ParsecT"><span class="hs-identifier hs-type">ParsecT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060120"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060117"><span class="hs-identifier hs-type">u</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060119"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679060116"><span class="hs-identifier hs-type">b</span></a></span></span></span></span></span></span><span>
</span><span id="line-358"></span><span class="hs-pragma">{-# INLINABLE</span><span> </span><span class="annot"><a href="Text.Parsec.Combinator.html#parserTraced"><span class="hs-pragma hs-type">parserTraced</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-359"></span><span id="parserTraced"><span class="annot"><span class="annottext">parserTraced :: forall s (m :: * -&gt; *) t u b.
(Stream s m t, Show t) =&gt;
String -&gt; ParsecT s u m b -&gt; ParsecT s u m b
</span><a href="Text.Parsec.Combinator.html#parserTraced"><span class="hs-identifier hs-var hs-var">parserTraced</span></a></span></span><span> </span><span id="local-6989586621679059831"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679059831"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span id="local-6989586621679059830"><span class="annot"><span class="annottext">ParsecT s u m b
</span><a href="#local-6989586621679059830"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-360"></span><span>  </span><span class="annot"><span class="annottext">String -&gt; ParsecT s u m ()
forall t s (m :: * -&gt; *) u.
(Show t, Stream s m t) =&gt;
String -&gt; ParsecT s u m ()
</span><a href="Text.Parsec.Combinator.html#parserTrace"><span class="hs-identifier hs-var">parserTrace</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679059831"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-361"></span><span>  </span><span class="annot"><span class="annottext">ParsecT s u m b
</span><a href="#local-6989586621679059830"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">ParsecT s u m b -&gt; ParsecT s u m b -&gt; ParsecT s u m b
forall s u (m :: * -&gt; *) a.
ParsecT s u m a -&gt; ParsecT s u m a -&gt; ParsecT s u m a
</span><a href="Text.Parsec.Prim.html#%3C%7C%3E"><span class="hs-operator hs-var">&lt;|&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; ParsecT s u m b -&gt; ParsecT s u m b
forall a. String -&gt; a -&gt; a
</span><a href="../../base/src/Debug.Trace.html#trace"><span class="hs-identifier hs-var">trace</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679059831"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot; backtracked&quot;</span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; ParsecT s u m b
forall (m :: * -&gt; *) a. MonadFail m =&gt; String -&gt; m a
</span><a href="../../base/src/Control.Monad.Fail.html#fail"><span class="hs-identifier hs-var">fail</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679059831"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-362"></span></pre></body></html>